Skip to content

Commit d60747f

Browse files
chenjigengsandersn
andauthored
Feat/quick fix for types (microsoft#42126)
* feat: add quick fix for types * feat: add test case for quick fix of types * feat: add did-you-mean error when Cannot_find_name_0 and Cannot_find_namespace_0 * feat: add Cannot_find_namespace_0_Did_you_mean_1 error and only suggest when resolve type * feat: update baselines * feat: update baselines * feat: update baselines * chore: fix style problem * Always suggest spelling corrections * suggest primitives instead of their wrappers * Add primitives to suggestions Instead of altering wrappers to look like primitives. * add semicolons * revert unneeded change Co-authored-by: Nathan Shively-Sanders <[email protected]>
1 parent ee24e2e commit d60747f

16 files changed

+95
-39
lines changed

src/compiler/checker.ts

+23-11
Original file line numberDiff line numberDiff line change
@@ -1764,9 +1764,8 @@ namespace ts {
17641764
nameNotFoundMessage: DiagnosticMessage | undefined,
17651765
nameArg: __String | Identifier | undefined,
17661766
isUse: boolean,
1767-
excludeGlobals = false,
1768-
issueSuggestions?: boolean): Symbol | undefined {
1769-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol, issueSuggestions);
1767+
excludeGlobals = false): Symbol | undefined {
1768+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
17701769
}
17711770

17721771
function resolveNameHelper(
@@ -1777,7 +1776,7 @@ namespace ts {
17771776
nameArg: __String | Identifier | undefined,
17781777
isUse: boolean,
17791778
excludeGlobals: boolean,
1780-
lookup: typeof getSymbol, issueSuggestions?: boolean): Symbol | undefined {
1779+
lookup: typeof getSymbol): Symbol | undefined {
17811780
const originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
17821781
let result: Symbol | undefined;
17831782
let lastLocation: Node | undefined;
@@ -2116,7 +2115,7 @@ namespace ts {
21162115
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
21172116
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
21182117
let suggestion: Symbol | undefined;
2119-
if (issueSuggestions && suggestionCount < maximumSuggestionCount) {
2118+
if (suggestionCount < maximumSuggestionCount) {
21202119
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
21212120
const isGlobalScopeAugmentationDeclaration = suggestion?.valueDeclaration && isAmbientModule(suggestion.valueDeclaration) && isGlobalScopeAugmentation(suggestion.valueDeclaration);
21222121
if (isGlobalScopeAugmentationDeclaration) {
@@ -2125,10 +2124,11 @@ namespace ts {
21252124
if (suggestion) {
21262125
const suggestionName = symbolToString(suggestion);
21272126
const isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
2128-
const message = isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1 : Diagnostics.Cannot_find_name_0_Did_you_mean_1;
2127+
const message = meaning === SymbolFlags.Namespace || nameArg && typeof nameArg !== "string" && nodeIsSynthesized(nameArg) ? Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
2128+
: isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1
2129+
: Diagnostics.Cannot_find_name_0_Did_you_mean_1;
21292130
const diagnostic = createError(errorLocation, message, diagnosticName(nameArg!), suggestionName);
21302131
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
2131-
21322132
if (suggestion.valueDeclaration) {
21332133
addRelatedInfo(
21342134
diagnostic,
@@ -3238,7 +3238,7 @@ namespace ts {
32383238
if (name.kind === SyntaxKind.Identifier) {
32393239
const message = meaning === namespaceMeaning || nodeIsSynthesized(name) ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name));
32403240
const symbolFromJSPrototype = isInJSFile(name) && !nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
3241-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
3241+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
32423242
if (!symbol) {
32433243
return getMergedSymbol(symbolFromJSPrototype);
32443244
}
@@ -22449,8 +22449,7 @@ namespace ts {
2244922449
getCannotFindNameDiagnosticForName(node),
2245022450
node,
2245122451
!isWriteOnlyAccess(node),
22452-
/*excludeGlobals*/ false,
22453-
/*issueSuggestions*/ true) || unknownSymbol;
22452+
/*excludeGlobals*/ false) || unknownSymbol;
2245422453
}
2245522454
return links.resolvedSymbol;
2245622455
}
@@ -28535,7 +28534,20 @@ namespace ts {
2853528534
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
2853628535
// So the table *contains* `x` but `x` isn't actually in scope.
2853728536
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
28538-
return symbol || getSpellingSuggestionForName(unescapeLeadingUnderscores(name), arrayFrom(symbols.values()), meaning);
28537+
if (symbol) return symbol;
28538+
let candidates: Symbol[];
28539+
if (symbols === globals) {
28540+
const primitives = mapDefined(
28541+
["string", "number", "boolean", "object", "bigint", "symbol"],
28542+
s => symbols.has((s.charAt(0).toUpperCase() + s.slice(1)) as __String)
28543+
? createSymbol(SymbolFlags.TypeAlias, s as __String) as Symbol
28544+
: undefined);
28545+
candidates = primitives.concat(arrayFrom(symbols.values()));
28546+
}
28547+
else {
28548+
candidates = arrayFrom(symbols.values());
28549+
}
28550+
return getSpellingSuggestionForName(unescapeLeadingUnderscores(name), candidates, meaning);
2853928551
});
2854028552
return result;
2854128553
}

src/compiler/diagnosticMessages.json

+4
Original file line numberDiff line numberDiff line change
@@ -3337,6 +3337,10 @@
33373337
"category": "Error",
33383338
"code": 2822
33393339
},
3340+
"Cannot find namespace '{0}'. Did you mean '{1}'?": {
3341+
"category": "Error",
3342+
"code": 2833
3343+
},
33403344

33413345
"Import declaration '{0}' is using private name '{1}'.": {
33423346
"category": "Error",

src/services/codefixes/fixSpelling.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace ts.codefix {
66
Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,
77
Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,
88
Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,
9+
Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
910
Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,
1011
Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
1112
Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,

tests/baselines/reference/declarationEmitUnknownImport.errors.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
tests/cases/compiler/declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'.
12
tests/cases/compiler/declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'.
23
tests/cases/compiler/declarationEmitUnknownImport.ts(1,14): error TS2503: Cannot find namespace 'SomeNonExistingName'.
34
tests/cases/compiler/declarationEmitUnknownImport.ts(1,14): error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'.
45

56

6-
==== tests/cases/compiler/declarationEmitUnknownImport.ts (3 errors) ====
7+
==== tests/cases/compiler/declarationEmitUnknownImport.ts (4 errors) ====
78
import Foo = SomeNonExistingName
9+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10+
!!! error TS2303: Circular definition of import alias 'Foo'.
811
~~~~~~~~~~~~~~~~~~~
912
!!! error TS2304: Cannot find name 'SomeNonExistingName'.
1013
~~~~~~~~~~~~~~~~~~~

tests/baselines/reference/declarationEmitUnknownImport2.errors.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,1): error TS2303: Circular definition of import alias 'Foo'.
12
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,12): error TS1005: '=' expected.
23
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,12): error TS2304: Cannot find name 'From'.
34
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,12): error TS2503: Cannot find namespace 'From'.
45
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,12): error TS4000: Import declaration 'Foo' is using private name 'From'.
56
tests/cases/compiler/declarationEmitUnknownImport2.ts(1,17): error TS1005: ';' expected.
67

78

8-
==== tests/cases/compiler/declarationEmitUnknownImport2.ts (5 errors) ====
9+
==== tests/cases/compiler/declarationEmitUnknownImport2.ts (6 errors) ====
910
import Foo From './Foo'; // Syntax error
11+
~~~~~~~~~~~~~~~
12+
!!! error TS2303: Circular definition of import alias 'Foo'.
1013
~~~~
1114
!!! error TS1005: '=' expected.
1215
~~~~

tests/baselines/reference/extendArray.errors.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tests/cases/compiler/extendArray.ts(7,19): error TS2304: Cannot find name '_element'.
2-
tests/cases/compiler/extendArray.ts(7,32): error TS2304: Cannot find name '_element'.
1+
tests/cases/compiler/extendArray.ts(7,19): error TS2552: Cannot find name '_element'. Did you mean 'Element'?
2+
tests/cases/compiler/extendArray.ts(7,32): error TS2552: Cannot find name '_element'. Did you mean 'Element'?
33

44

55
==== tests/cases/compiler/extendArray.ts (2 errors) ====
@@ -11,9 +11,11 @@ tests/cases/compiler/extendArray.ts(7,32): error TS2304: Cannot find name '_elem
1111
interface Array {
1212
collect(fn:(e:_element) => _element[]) : any[];
1313
~~~~~~~~
14-
!!! error TS2304: Cannot find name '_element'.
14+
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
15+
!!! related TS2728 /.ts/lib.dom.d.ts:4792:13: 'Element' is declared here.
1516
~~~~~~~~
16-
!!! error TS2304: Cannot find name '_element'.
17+
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
18+
!!! related TS2728 /.ts/lib.dom.d.ts:4792:13: 'Element' is declared here.
1719
}
1820
}
1921

tests/baselines/reference/importedModuleAddToGlobal.errors.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2503: Cannot find namespace 'b'.
1+
tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2833: Cannot find namespace 'b'. Did you mean 'B'?
22

33

44
==== tests/cases/compiler/importedModuleAddToGlobal.ts (1 errors) ====
@@ -18,5 +18,6 @@ tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2503: Cannot f
1818
import a = A;
1919
function hello(): b.B { return null; }
2020
~
21-
!!! error TS2503: Cannot find namespace 'b'.
21+
!!! error TS2833: Cannot find namespace 'b'. Did you mean 'B'?
22+
!!! related TS2728 tests/cases/compiler/importedModuleAddToGlobal.ts:8:8: 'B' is declared here.
2223
}

tests/baselines/reference/invalidInstantiatedModule.errors.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(2,18): error TS2300: Duplicate identifier 'Point'.
22
tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(3,16): error TS2300: Duplicate identifier 'Point'.
3-
tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(12,8): error TS2503: Cannot find namespace 'm'.
3+
tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(12,8): error TS2833: Cannot find namespace 'm'. Did you mean 'M'?
44

55

66
==== tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts (3 errors) ====
@@ -21,7 +21,8 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedMo
2121
var m = M2;
2222
var p: m.Point; // Error
2323
~
24-
!!! error TS2503: Cannot find namespace 'm'.
24+
!!! error TS2833: Cannot find namespace 'm'. Did you mean 'M'?
25+
!!! related TS2728 tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts:1:8: 'M' is declared here.
2526

2627

2728

tests/baselines/reference/jsdocPropertyTagInvalid.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/a.js(3,15): error TS2304: Cannot find name 'sting'.
1+
/a.js(3,15): error TS2552: Cannot find name 'sting'. Did you mean 'string'?
22

33

44
==== /a.js (1 errors) ====
55
/**
66
* @typedef MyType
77
* @property {sting} [x]
88
~~~~~
9-
!!! error TS2304: Cannot find name 'sting'.
9+
!!! error TS2552: Cannot find name 'sting'. Did you mean 'string'?
1010
*/
1111

1212
/** @param {MyType} p */

tests/baselines/reference/jsxFactoryIdentifierWithAbsentParameter.errors.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/test.tsx(9,17): error TS2304: Cannot find name 'createElement'.
1+
tests/cases/compiler/test.tsx(9,17): error TS2552: Cannot find name 'createElement'. Did you mean 'frameElement'?
22

33

44
==== tests/cases/compiler/test.tsx (1 errors) ====
@@ -12,7 +12,8 @@ tests/cases/compiler/test.tsx(9,17): error TS2304: Cannot find name 'createEleme
1212
render() {
1313
return <div />;
1414
~~~
15-
!!! error TS2304: Cannot find name 'createElement'.
15+
!!! error TS2552: Cannot find name 'createElement'. Did you mean 'frameElement'?
16+
!!! related TS2728 /.ts/lib.dom.d.ts:17075:13: 'frameElement' is declared here.
1617
}
1718
}
1819

tests/baselines/reference/jsxFactoryQualifiedNameResolutionError.errors.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/test.tsx(9,17): error TS2304: Cannot find name 'MyElement'.
1+
tests/cases/compiler/test.tsx(9,17): error TS2552: Cannot find name 'MyElement'. Did you mean 'Element'?
22

33

44
==== tests/cases/compiler/test.tsx (1 errors) ====
@@ -12,6 +12,7 @@ tests/cases/compiler/test.tsx(9,17): error TS2304: Cannot find name 'MyElement'.
1212
render(createElement) {
1313
return <div />;
1414
~~~
15-
!!! error TS2304: Cannot find name 'MyElement'.
15+
!!! error TS2552: Cannot find name 'MyElement'. Did you mean 'Element'?
16+
!!! related TS2728 /.ts/lib.dom.d.ts:4792:13: 'Element' is declared here.
1617
}
1718
}

tests/baselines/reference/parserUnfinishedTypeNameBeforeKeyword1.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts(1,8): error TS2503: Cannot find namespace 'TypeModule1'.
1+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts(1,8): error TS2833: Cannot find namespace 'TypeModule1'. Did you mean 'TypeModule2'?
22
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts(1,20): error TS1003: Identifier expected.
33

44

55
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts (2 errors) ====
66
var x: TypeModule1.
77
~~~~~~~~~~~
8-
!!! error TS2503: Cannot find namespace 'TypeModule1'.
8+
!!! error TS2833: Cannot find namespace 'TypeModule1'. Did you mean 'TypeModule2'?
99

1010
!!! error TS1003: Identifier expected.
1111
module TypeModule2 {
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,23): error TS2304: Cannot find name 'IPromise'.
2-
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,45): error TS2304: Cannot find name 'IPromise'.
1+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,23): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
2+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,45): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
33
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,54): error TS1005: '>' expected.
44

55

66
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts (3 errors) ====
77
interface IQService {
88
all(promises: IPromise < any > []): IPromise<
99
~~~~~~~~
10-
!!! error TS2304: Cannot find name 'IPromise'.
10+
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
1111
~~~~~~~~
12-
!!! error TS2304: Cannot find name 'IPromise'.
12+
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
1313

1414
!!! error TS1005: '>' expected.

tests/baselines/reference/parserUnterminatedGeneric2.errors.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGener
1010
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,37): error TS2693: 'any' only refers to a type, but is being used as a value here.
1111
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,41): error TS1005: ';' expected.
1212
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,43): error TS2693: 'any' only refers to a type, but is being used as a value here.
13-
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,23): error TS2304: Cannot find name 'IPromise'.
14-
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,45): error TS2304: Cannot find name 'IPromise'.
13+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,23): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
14+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,45): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
1515
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,54): error TS1005: '>' expected.
1616

1717

@@ -49,8 +49,8 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGener
4949
interface IQService {
5050
all(promises: IPromise < any > []): IPromise<
5151
~~~~~~~~
52-
!!! error TS2304: Cannot find name 'IPromise'.
52+
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
5353
~~~~~~~~
54-
!!! error TS2304: Cannot find name 'IPromise'.
54+
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'?
5555

5656
!!! error TS1005: '>' expected.

tests/baselines/reference/primaryExpressionMods.errors.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/primaryExpressionMods.ts(7,8): error TS2709: Cannot use namespace 'M' as a type.
2-
tests/cases/compiler/primaryExpressionMods.ts(11,8): error TS2503: Cannot find namespace 'm'.
2+
tests/cases/compiler/primaryExpressionMods.ts(11,8): error TS2833: Cannot find namespace 'm'. Did you mean 'M'?
33

44

55
==== tests/cases/compiler/primaryExpressionMods.ts (2 errors) ====
@@ -17,5 +17,6 @@ tests/cases/compiler/primaryExpressionMods.ts(11,8): error TS2503: Cannot find n
1717
var x2 = m.a; // Same as M.a
1818
var q: m.P; // Error
1919
~
20-
!!! error TS2503: Cannot find namespace 'm'.
20+
!!! error TS2833: Cannot find namespace 'm'. Did you mean 'M'?
21+
!!! related TS2728 tests/cases/compiler/primaryExpressionMods.ts:1:8: 'M' is declared here.
2122

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
//// declare let a: numbers;
4+
//// declare let b: Numbers;
5+
//// declare let c: objects;
6+
//// declare let d: Objects;
7+
//// declare let e: RegEx;
8+
//// namespace yadda {
9+
//// export type Thing = string;
10+
//// }
11+
//// let f: yaddas.Thing;
12+
13+
verify.codeFixAll({
14+
fixId: "fixSpelling",
15+
fixAllDescription: "Fix all detected spelling errors",
16+
newFileContent:
17+
`declare let a: number;
18+
declare let b: Number;
19+
declare let c: object;
20+
declare let d: Object;
21+
declare let e: RegExp;
22+
namespace yadda {
23+
export type Thing = string;
24+
}
25+
let f: yadda.Thing;`,
26+
});

0 commit comments

Comments
 (0)