You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to get the CallSignatureType for functions defined in the typescript lib files. I can't seem to get this to work. However, getting the getReturnTypeAnnotation seems to work for some functions. Please let me know how to add typescript lib files to my analysis so I can get call signatures consistently. Do I have to copy over the .d.ts files from the typescript source?
JavaScript file:
let x = BigInt.asUintN(64, 0);
let cachedTextEncoder = new TextEncoder('utf-8');
let y = cachedTextEncoder.encode("hi")
The following CodeQL query returns no results:
from Function called_function, CallExpr call
where called_function.getName() = call.getCalleeName()
select call, called_function.getCallSignature()
The following CodeQL query returns results for the cachedTextEncoder.encode call:
from Function called_function, CallExpr call
where called_function.getName() = call.getCalleeName()
select call, called_function.getCallSignature()
I am building the codeql database as follows after running tsc --init in the directory with the js file I want to analyze.
getCallSignature only has results for functions in TypeScript files, that is, files with the extension .ts or .tsx. Could you double check if the files have this extension?
I can;t find the source for TextEncoder.encode - it shows up in the file util.d.ts under typescript's typing of node, but here is a link to the MDN docs.
Hello,
I want to be able to get the CallSignatureType for functions defined in the typescript lib files. I can't seem to get this to work. However, getting the getReturnTypeAnnotation seems to work for some functions. Please let me know how to add typescript lib files to my analysis so I can get call signatures consistently. Do I have to copy over the .d.ts files from the typescript source?
JavaScript file:
The following CodeQL query returns no results:
The following CodeQL query returns results for the
cachedTextEncoder.encode
call:I am building the codeql database as follows after running
tsc --init
in the directory with the js file I want to analyze.Thank you!
The text was updated successfully, but these errors were encountered: