-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: 9f9825a Fix: checkAliasSymbol crash when checking for @deprecated It's possible that we shouldn't be creating symbol with no declarations from non-homomorphic mapped types, but for 4.2, the right fix is to make the @deprecated-check in checkAliasSymbol ensure that target.declarations is defined. 75449de Add bug number and accept baselines Co-authored-by: Nathan Shively-Sanders <[email protected]>
- Loading branch information
Showing
5 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//// [tests/cases/compiler/importPropertyFromMappedType.ts] //// | ||
|
||
//// [errors.d.ts] | ||
// #42957 | ||
|
||
export = createHttpError; | ||
declare const createHttpError: createHttpError.NamedConstructors; | ||
declare namespace createHttpError { | ||
type NamedConstructors = { [P in 'NotFound']: unknown;} | ||
} | ||
|
||
//// [main.ts] | ||
import { NotFound } from './errors' | ||
|
||
|
||
//// [main.js] | ||
"use strict"; | ||
exports.__esModule = true; |
23 changes: 23 additions & 0 deletions
23
tests/baselines/reference/importPropertyFromMappedType.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
=== tests/cases/compiler/errors.d.ts === | ||
// #42957 | ||
|
||
export = createHttpError; | ||
>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) | ||
|
||
declare const createHttpError: createHttpError.NamedConstructors; | ||
>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) | ||
>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) | ||
>NamedConstructors : Symbol(createHttpError.NamedConstructors, Decl(errors.d.ts, 4, 35)) | ||
|
||
declare namespace createHttpError { | ||
>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) | ||
|
||
type NamedConstructors = { [P in 'NotFound']: unknown;} | ||
>NamedConstructors : Symbol(NamedConstructors, Decl(errors.d.ts, 4, 35)) | ||
>P : Symbol(P, Decl(errors.d.ts, 5, 33)) | ||
} | ||
|
||
=== tests/cases/compiler/main.ts === | ||
import { NotFound } from './errors' | ||
>NotFound : Symbol(NotFound, Decl(main.ts, 0, 8)) | ||
|
19 changes: 19 additions & 0 deletions
19
tests/baselines/reference/importPropertyFromMappedType.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
=== tests/cases/compiler/errors.d.ts === | ||
// #42957 | ||
|
||
export = createHttpError; | ||
>createHttpError : createHttpError.NamedConstructors | ||
|
||
declare const createHttpError: createHttpError.NamedConstructors; | ||
>createHttpError : createHttpError.NamedConstructors | ||
>createHttpError : any | ||
|
||
declare namespace createHttpError { | ||
type NamedConstructors = { [P in 'NotFound']: unknown;} | ||
>NamedConstructors : NamedConstructors | ||
} | ||
|
||
=== tests/cases/compiler/main.ts === | ||
import { NotFound } from './errors' | ||
>NotFound : unknown | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// #42957 | ||
|
||
// @filename: errors.d.ts | ||
export = createHttpError; | ||
declare const createHttpError: createHttpError.NamedConstructors; | ||
declare namespace createHttpError { | ||
type NamedConstructors = { [P in 'NotFound']: unknown;} | ||
} | ||
|
||
// @filename: main.ts | ||
import { NotFound } from './errors' |