Files
codeql/javascript/ql/test/query-tests/Declarations/DeadStoreOfLocal/computedInterfaceProperty.ts
2019-09-09 10:51:21 +01:00

28 lines
340 B
TypeScript

import { Foo } from "./exportSymbol" // OK
export interface FooMap {
[Foo]: number; // OK
}
const Bar = "Bar"; // OK
export interface BarMap {
[Bar]: number;
}
const Baz = "Baz"; // OK
if (false) {
Baz;
}
function getBaz(): typeof Baz { return null; }
class C {} // OK
if (false) {
C;
}
function getC(): C { return null; }