Files
codeql/javascript/ql/test/library-tests/DataFlow/tst2.ts
2022-11-15 22:07:24 +01:00

16 lines
426 B
TypeScript

export namespace A {
export let x = 42;
setX();
x; // global namespace exports are incompletely analysed
}
function setX() {
A.x = 23;
}
var nd2 = A.x as number; // flow through type assertions
class StringList extends List<string> {} // flow through expressions with type arguments
var nd2 = A.x satisfies number; // flow through satisfies expressions