mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Ensure instantiation expressions have symbols, preventing crash in signature relations (#56064)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// @strict: true
|
||||
|
||||
class ErrImpl<E> {
|
||||
e!: E;
|
||||
}
|
||||
|
||||
declare const Err: typeof ErrImpl & (<T>() => T);
|
||||
|
||||
type ErrAlias<U> = typeof Err<U>;
|
||||
|
||||
declare const e: ErrAlias<number>;
|
||||
e as ErrAlias<string>;
|
||||
@@ -0,0 +1,17 @@
|
||||
// @strict: true
|
||||
|
||||
declare class Class<T> {
|
||||
x: T;
|
||||
}
|
||||
|
||||
declare function fn<T>(): T;
|
||||
|
||||
|
||||
type ClassAlias<T> = typeof Class<T>;
|
||||
type FnAlias<T> = typeof fn<T>;
|
||||
|
||||
type Wat<T> = ClassAlias<T> & FnAlias<T>;
|
||||
|
||||
|
||||
declare const wat: Wat<number>;
|
||||
wat as Wat<string>;
|
||||
Reference in New Issue
Block a user