Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.68.1, 1.69.2, 1.70.0
- OS Version: Windows_NT x64
Steps to Reproduce:
- Create a new file, select the language as Typescript.
- Type in the code below:
class A {
static Foo = class {}
}
class AFoo extends A.Foo {}
This is valid typescript, and it works OK in v1.67.2 and prior versions.
However, in v1.68.1 and newer(tested in 1.68.1, 1.69.2, 1.70.0), the editor shows two unexpected problems:
Cannot find name 'A'.ts(2304)
'A' only refers to a type, but is being used as a namespace here.ts(2702)
Screenshots for comparison:
1.67.2

1.68.1

Notice that this code works OK in Typescript Playground v4.7.3 (which is bundled by VSCode v1.68.1), so I suppose it may be caused by vscode itself rather than the tsserver.
(updated 2022.9.4) Add two similar cases:
const B = {
Foo: class { }
}
namespace C {
export class Foo { }
}
class BFoo extends B.Foo {
// ^ error here, expect no error
}
class CFoo extends C.Foo {
// ^ no error as expected
}
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
This is valid typescript, and it works OK in v1.67.2 and prior versions.
However, in v1.68.1 and newer(tested in 1.68.1, 1.69.2, 1.70.0), the editor shows two unexpected problems:
Cannot find name 'A'.ts(2304)'A' only refers to a type, but is being used as a namespace here.ts(2702)Screenshots for comparison:

1.67.2
1.68.1

Notice that this code works OK in Typescript Playground v4.7.3 (which is bundled by VSCode v1.68.1), so I suppose it may be caused by vscode itself rather than the tsserver.
(updated 2022.9.4) Add two similar cases: