mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Reuse type nodes from optional parameters even when not written as a union with undefined (#48605)
* Reuse type nodes from optional parameters and properties even when not written as a union with `undefined` * Remove newly unneeded NodeBuilderFlag * Update public API * Update baselines from main
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// @module: esnext
|
||||
// @outDir: dist
|
||||
// @declaration: true
|
||||
// @emitDeclarationOnly: true
|
||||
// @strictNullChecks: true
|
||||
|
||||
// @Filename: a.ts
|
||||
export interface Foo {}
|
||||
|
||||
// @Filename: b.ts
|
||||
import * as a from "./a";
|
||||
declare global {
|
||||
namespace teams {
|
||||
export namespace calling {
|
||||
export import Foo = a.Foo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @Filename: c.ts
|
||||
type Foo = teams.calling.Foo;
|
||||
export const bar = (p?: Foo) => {}
|
||||
Reference in New Issue
Block a user