mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
14 lines
293 B
TypeScript
14 lines
293 B
TypeScript
// @strict: true
|
|
// @noUnusedLocals: true
|
|
// @target: esnext, es2022
|
|
|
|
class Foo {
|
|
#unused: undefined; // expect unused error
|
|
#brand: undefined; // expect no error
|
|
|
|
isFoo(v: any): v is Foo {
|
|
// This should count as using/reading '#brand'
|
|
return #brand in v;
|
|
}
|
|
}
|