mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
+2
-3
@@ -60,8 +60,7 @@ export declare type TypeB = Merge<TypeA, {
|
||||
b: string;
|
||||
}>;
|
||||
//// [index.d.ts]
|
||||
import { TypeB } from './type-b';
|
||||
export declare class Broken {
|
||||
method(): import("./types").Merge<import("./type-a").TypeA, {
|
||||
b: string;
|
||||
}>;
|
||||
method(): TypeB;
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,10 +6,10 @@ export class Broken {
|
||||
>Broken : Broken
|
||||
|
||||
method () {
|
||||
>method : () => import("tests/cases/compiler/Uppercased_Dir/src/types").Merge<import("tests/cases/compiler/Uppercased_Dir/src/type-a").TypeA, { b: string; }>
|
||||
>method : () => TypeB
|
||||
|
||||
return { } as TypeB;
|
||||
>{ } as TypeB : import("tests/cases/compiler/Uppercased_Dir/src/types").Merge<import("tests/cases/compiler/Uppercased_Dir/src/type-a").TypeA, { b: string; }>
|
||||
>{ } as TypeB : TypeB
|
||||
>{ } : {}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import { TypeA } from './type-a';
|
||||
>TypeA : any
|
||||
|
||||
export type TypeB = Merge<TypeA, {
|
||||
>TypeB : Merge<TypeA, { b: string; }>
|
||||
>TypeB : TypeB
|
||||
|
||||
b: string;
|
||||
>b : string
|
||||
|
||||
@@ -150,7 +150,7 @@ type OptionsOfKind<K extends Options["k"]> = Extract<Options, { k: K }>;
|
||||
>k : K
|
||||
|
||||
type T16 = OptionsOfKind<"a" | "b">; // { k: "a", a: number } | { k: "b", b: string }
|
||||
>T16 : { k: "a"; a: number; } | { k: "b"; b: string; }
|
||||
>T16 : T16
|
||||
|
||||
type Select<T, K extends keyof T, V extends T[K]> = Extract<T, { [P in K]: V }>;
|
||||
>Select : Extract<T, { [P in K]: V; }>
|
||||
@@ -971,13 +971,13 @@ type c2 = B2['c']; // 'c' | 'b'
|
||||
// Repro from #21929
|
||||
|
||||
type NonFooKeys1<T extends object> = OldDiff<keyof T, 'foo'>;
|
||||
>NonFooKeys1 : OldDiff<keyof T, "foo">
|
||||
>NonFooKeys1 : NonFooKeys1<T>
|
||||
|
||||
type NonFooKeys2<T extends object> = Exclude<keyof T, 'foo'>;
|
||||
>NonFooKeys2 : Exclude<keyof T, "foo">
|
||||
|
||||
type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz"
|
||||
>Test1 : OldDiff<"foo" | "bar" | "baz", "foo">
|
||||
>Test1 : Test1
|
||||
>foo : 1
|
||||
>bar : 2
|
||||
>baz : 3
|
||||
|
||||
@@ -14,7 +14,7 @@ import { Result } from "lib/result";
|
||||
>Result : any
|
||||
|
||||
export type T<T> = Result<Error, T>;
|
||||
>T : Result<Error, T>
|
||||
>T : import("tests/cases/compiler/src/datastore_result").T<T>
|
||||
|
||||
=== tests/cases/compiler/src/conditional_directive_field.ts ===
|
||||
import * as DatastoreResult from "src/datastore_result";
|
||||
|
||||
@@ -11,10 +11,10 @@ type StringContains<S extends string, L extends string> = (
|
||||
)[L]
|
||||
|
||||
type ObjectHasKey<O, L extends string> = StringContains<Extract<keyof O, string>, L>
|
||||
>ObjectHasKey : StringContains<Extract<keyof O, string>, L>
|
||||
>ObjectHasKey : ObjectHasKey<O, L>
|
||||
|
||||
type First<T> = ObjectHasKey<T, '0'>; // Should be deferred
|
||||
>First : StringContains<Extract<keyof T, string>, "0">
|
||||
>First : First<T>
|
||||
|
||||
type T1 = ObjectHasKey<{ a: string }, 'a'>; // 'true'
|
||||
>T1 : "true"
|
||||
|
||||
@@ -6,10 +6,10 @@ type StringContains<S extends string, L extends string> = ({ [K in S]: 'true' }
|
||||
>key : string
|
||||
|
||||
type ObjectHasKey<O, L extends string> = StringContains<Extract<keyof O, string>, L>;
|
||||
>ObjectHasKey : StringContains<Extract<keyof O, string>, L>
|
||||
>ObjectHasKey : ObjectHasKey<O, L>
|
||||
|
||||
type A<T> = ObjectHasKey<T, '0'>;
|
||||
>A : StringContains<Extract<keyof T, string>, "0">
|
||||
>A : A<T>
|
||||
|
||||
type B = ObjectHasKey<[string, number], '1'>; // "true"
|
||||
>B : "true"
|
||||
|
||||
@@ -145,7 +145,7 @@ type P0 = {};
|
||||
>P0 : P0
|
||||
|
||||
type P3Names = RequiredPropNames<P3>; // expect 'a' | 'b'
|
||||
>P3Names : RequiredPropNames<P3>
|
||||
>P3Names : P3Names
|
||||
|
||||
type P2Names = RequiredPropNames<P2>; // expect 'a'
|
||||
>P2Names : "a"
|
||||
@@ -214,7 +214,7 @@ type O0 = {};
|
||||
>O0 : O0
|
||||
|
||||
type O3Names = OptionalPropNames<O3>; // expect 'a' | 'b'
|
||||
>O3Names : OptionalPropNames<O3>
|
||||
>O3Names : O3Names
|
||||
|
||||
type O2Names = OptionalPropNames<O2>; // expect 'a'
|
||||
>O2Names : "a"
|
||||
|
||||
@@ -13,29 +13,29 @@ type Nominal<Kind extends string, Type> = Type & {
|
||||
};
|
||||
|
||||
type A = Nominal<'A', string>;
|
||||
>A : Nominal<"A", string>
|
||||
>A : A
|
||||
|
||||
declare const a: Set<A>;
|
||||
>a : Set<Nominal<"A", string>>
|
||||
>a : Set<A>
|
||||
|
||||
declare const b: Set<A>;
|
||||
>b : Set<Nominal<"A", string>>
|
||||
>b : Set<A>
|
||||
|
||||
const c1 = Array.from(a).concat(Array.from(b));
|
||||
>c1 : Nominal<"A", string>[]
|
||||
>Array.from(a).concat(Array.from(b)) : Nominal<"A", string>[]
|
||||
>Array.from(a).concat : { (...items: ConcatArray<Nominal<"A", string>>[]): Nominal<"A", string>[]; (...items: (Nominal<"A", string> | ConcatArray<Nominal<"A", string>>)[]): Nominal<"A", string>[]; }
|
||||
>Array.from(a) : Nominal<"A", string>[]
|
||||
>c1 : A[]
|
||||
>Array.from(a).concat(Array.from(b)) : A[]
|
||||
>Array.from(a).concat : { (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }
|
||||
>Array.from(a) : A[]
|
||||
>Array.from : { <T>(arrayLike: ArrayLike<T>): T[]; <T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; <T>(iterable: Iterable<T> | ArrayLike<T>): T[]; <T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; }
|
||||
>Array : ArrayConstructor
|
||||
>from : { <T>(arrayLike: ArrayLike<T>): T[]; <T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; <T>(iterable: Iterable<T> | ArrayLike<T>): T[]; <T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; }
|
||||
>a : Set<Nominal<"A", string>>
|
||||
>concat : { (...items: ConcatArray<Nominal<"A", string>>[]): Nominal<"A", string>[]; (...items: (Nominal<"A", string> | ConcatArray<Nominal<"A", string>>)[]): Nominal<"A", string>[]; }
|
||||
>Array.from(b) : Nominal<"A", string>[]
|
||||
>a : Set<A>
|
||||
>concat : { (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }
|
||||
>Array.from(b) : A[]
|
||||
>Array.from : { <T>(arrayLike: ArrayLike<T>): T[]; <T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; <T>(iterable: Iterable<T> | ArrayLike<T>): T[]; <T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; }
|
||||
>Array : ArrayConstructor
|
||||
>from : { <T>(arrayLike: ArrayLike<T>): T[]; <T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; <T>(iterable: Iterable<T> | ArrayLike<T>): T[]; <T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; }
|
||||
>b : Set<Nominal<"A", string>>
|
||||
>b : Set<A>
|
||||
|
||||
// Simpler repro
|
||||
|
||||
@@ -43,7 +43,7 @@ declare function from<T>(): T[];
|
||||
>from : <T>() => T[]
|
||||
|
||||
const c2: ReadonlyArray<A> = from();
|
||||
>c2 : readonly Nominal<"A", string>[]
|
||||
>from() : Nominal<"A", string>[]
|
||||
>c2 : readonly A[]
|
||||
>from() : A[]
|
||||
>from : <T>() => T[]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(17
|
||||
Property 'y' is incompatible with index signature.
|
||||
Property 'a' is missing in type 'B' but required in type 'A'.
|
||||
tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(27,10): error TS2339: Property 'b' does not exist on type '{ a: string; }'.
|
||||
tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(29,7): error TS2322: Type 'constr<{}, { [key: string]: { a: string; }; }>' is not assignable to type '{ [key: string]: { a: string; b: string; }; }'.
|
||||
tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(29,7): error TS2322: Type 's' is not assignable to type '{ [key: string]: { a: string; b: string; }; }'.
|
||||
Index signatures are incompatible.
|
||||
Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: string; }'.
|
||||
tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(35,1): error TS2322: Type '{ a: string; } & { b: number; }' is not assignable to type '{ [key: string]: string; }'.
|
||||
@@ -48,7 +48,7 @@ tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts(35
|
||||
|
||||
const d: { [key: string]: {a: string, b: string} } = q; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'constr<{}, { [key: string]: { a: string; }; }>' is not assignable to type '{ [key: string]: { a: string; b: string; }; }'.
|
||||
!!! error TS2322: Type 's' is not assignable to type '{ [key: string]: { a: string; b: string; }; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: string; }'.
|
||||
!!! related TS2728 tests/cases/conformance/types/intersection/intersectionWithIndexSignatures.ts:29:39: 'b' is declared here.
|
||||
|
||||
@@ -65,19 +65,19 @@ type constr<Source, Tgt> = { [K in keyof Source]: string } & Pick<Tgt, Exclude<k
|
||||
>constr : constr<Source, Tgt>
|
||||
|
||||
type s = constr<{}, { [key: string]: { a: string } }>;
|
||||
>s : constr<{}, { [key: string]: { a: string; }; }>
|
||||
>s : s
|
||||
>key : string
|
||||
>a : string
|
||||
|
||||
declare const q: s;
|
||||
>q : constr<{}, { [key: string]: { a: string; }; }>
|
||||
>q : s
|
||||
|
||||
q["asd"].a.substr(1);
|
||||
>q["asd"].a.substr(1) : string
|
||||
>q["asd"].a.substr : (from: number, length?: number | undefined) => string
|
||||
>q["asd"].a : string
|
||||
>q["asd"] : { a: string; }
|
||||
>q : constr<{}, { [key: string]: { a: string; }; }>
|
||||
>q : s
|
||||
>"asd" : "asd"
|
||||
>a : string
|
||||
>substr : (from: number, length?: number | undefined) => string
|
||||
@@ -86,7 +86,7 @@ q["asd"].a.substr(1);
|
||||
q["asd"].b; // Error
|
||||
>q["asd"].b : any
|
||||
>q["asd"] : { a: string; }
|
||||
>q : constr<{}, { [key: string]: { a: string; }; }>
|
||||
>q : s
|
||||
>"asd" : "asd"
|
||||
>b : any
|
||||
|
||||
@@ -95,7 +95,7 @@ const d: { [key: string]: {a: string, b: string} } = q; // Error
|
||||
>key : string
|
||||
>a : string
|
||||
>b : string
|
||||
>q : constr<{}, { [key: string]: { a: string; }; }>
|
||||
>q : s
|
||||
|
||||
// Repro from #32484
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ type ExtractValueType<T> = T extends ReactSelectProps<infer U> ? U : never;
|
||||
>ExtractValueType : ExtractValueType<T>
|
||||
|
||||
export type ReactSingleSelectProps<
|
||||
>ReactSingleSelectProps : Overwrite<Omit<WrappedProps, "multi">, Props<ExtractValueType<WrappedProps>>>
|
||||
>ReactSingleSelectProps : ReactSingleSelectProps<WrappedProps>
|
||||
|
||||
WrappedProps extends ReactSelectProps<any>
|
||||
> = Overwrite<
|
||||
@@ -118,11 +118,11 @@ declare class ReactSelectClass<TValue = OptionValues> extends React.Component<Re
|
||||
}
|
||||
|
||||
export type OptionComponentType<TValue = OptionValues> = React.ComponentType<OptionComponentProps<TValue>>;
|
||||
>OptionComponentType : React.ComponentType<OptionComponentProps<TValue>>
|
||||
>OptionComponentType : OptionComponentType<TValue>
|
||||
>React : any
|
||||
|
||||
export type ValueComponentType<TValue = OptionValues> = React.ComponentType<ValueComponentProps<TValue>>;
|
||||
>ValueComponentType : React.ComponentType<ValueComponentProps<TValue>>
|
||||
>ValueComponentType : ValueComponentType<TValue>
|
||||
>React : any
|
||||
|
||||
export type HandlerRendererResult = JSX.Element | null | false;
|
||||
@@ -859,7 +859,7 @@ export interface ReactSelectProps<TValue = OptionValues> extends React.Props<Rea
|
||||
* option component to render in dropdown
|
||||
*/
|
||||
optionComponent?: OptionComponentType<TValue>;
|
||||
>optionComponent : React.ComponentType<OptionComponentProps<TValue>> | undefined
|
||||
>optionComponent : OptionComponentType<TValue> | undefined
|
||||
|
||||
/**
|
||||
* function which returns a custom way to render the options in the menu
|
||||
@@ -973,7 +973,7 @@ export interface ReactSelectProps<TValue = OptionValues> extends React.Props<Rea
|
||||
* value component to render
|
||||
*/
|
||||
valueComponent?: ValueComponentType<TValue>;
|
||||
>valueComponent : React.ComponentType<ValueComponentProps<TValue>> | undefined
|
||||
>valueComponent : ValueComponentType<TValue> | undefined
|
||||
|
||||
/**
|
||||
* optional style to apply to the component wrapper
|
||||
|
||||
@@ -85,6 +85,6 @@ type Values<T> = T[keyof T];
|
||||
>Values : Values<T>
|
||||
|
||||
type ValuesOfObj = Values<typeof obj>;
|
||||
>ValuesOfObj : Values<{ num: number; str: string; 0: 0; [sym]: symbol; }>
|
||||
>ValuesOfObj : ValuesOfObj
|
||||
>obj : { num: number; str: string; 0: 0; [sym]: symbol; }
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ type T04<T, U> = keyof (T & U); // keyof T | keyof U
|
||||
>T04 : keyof T | keyof U
|
||||
|
||||
type T05 = T02<A>; // "a" | "b"
|
||||
>T05 : "b" | "a"
|
||||
>T05 : T05
|
||||
|
||||
type T06 = T03<B>; // "a" | "b"
|
||||
>T06 : "b" | "a"
|
||||
>T06 : T06
|
||||
|
||||
type T07 = T04<A, B>; // "a" | "b"
|
||||
>T07 : "b" | "a"
|
||||
>T07 : T07
|
||||
|
||||
// Repros from #22291
|
||||
|
||||
@@ -34,7 +34,7 @@ type Example1<T extends string, U extends string> = keyof (Record<T, any> & Reco
|
||||
>Example1 : T | U
|
||||
|
||||
type Result1 = Example1<'x', 'y'>; // "x" | "y"
|
||||
>Result1 : "x" | "y"
|
||||
>Result1 : Result1
|
||||
|
||||
type Result2 = keyof (Record<'x', any> & Record<'y', any>); // "x" | "y"
|
||||
>Result2 : "x" | "y"
|
||||
@@ -55,5 +55,5 @@ type Example5<T, U> = keyof (T & U);
|
||||
>Example5 : keyof T | keyof U
|
||||
|
||||
type Result5 = Example5<Record<'x', any>, Record<'y', any>>; // "x" | "y"
|
||||
>Result5 : "x" | "y"
|
||||
>Result5 : Result5
|
||||
|
||||
|
||||
@@ -275,12 +275,12 @@ const propTypesWithoutAnnotation = {
|
||||
};
|
||||
|
||||
type ExtractedProps = PropTypes.InferProps<typeof propTypes>;
|
||||
>ExtractedProps : PropTypes.InferProps<PropTypes.ValidationMap<Props>>
|
||||
>ExtractedProps : ExtractedProps
|
||||
>PropTypes : any
|
||||
>propTypes : PropTypes.ValidationMap<Props>
|
||||
|
||||
type ExtractedPropsWithoutAnnotation = PropTypes.InferProps<typeof propTypesWithoutAnnotation>;
|
||||
>ExtractedPropsWithoutAnnotation : PropTypes.InferProps<{ any: PropTypes.Requireable<any>; array: PropTypes.Validator<any[]>; bool: PropTypes.Validator<boolean>; shape: PropTypes.Validator<PropTypes.InferProps<{ foo: PropTypes.Validator<string>; bar: PropTypes.Requireable<boolean>; baz: PropTypes.Requireable<any>; }>>; oneOfType: PropTypes.Validator<string | boolean | PropTypes.InferProps<{ foo: PropTypes.Requireable<string>; bar: PropTypes.Validator<number>; }>>; }>
|
||||
>ExtractedPropsWithoutAnnotation : ExtractedPropsWithoutAnnotation
|
||||
>PropTypes : any
|
||||
>propTypesWithoutAnnotation : { any: PropTypes.Requireable<any>; array: PropTypes.Validator<any[]>; bool: PropTypes.Validator<boolean>; shape: PropTypes.Validator<PropTypes.InferProps<{ foo: PropTypes.Validator<string>; bar: PropTypes.Requireable<boolean>; baz: PropTypes.Requireable<any>; }>>; oneOfType: PropTypes.Validator<string | boolean | PropTypes.InferProps<{ foo: PropTypes.Requireable<string>; bar: PropTypes.Validator<number>; }>>; }
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ declare namespace Tools {
|
||||
>Cast : Cast<X, Y>
|
||||
|
||||
type Pos<I extends any[]> =
|
||||
>Pos : Length<I>
|
||||
>Pos : Pos<I>
|
||||
|
||||
Length<I>;
|
||||
|
||||
@@ -116,7 +116,7 @@ declare namespace Tools {
|
||||
>Reverse : Reverse<T, R, I>
|
||||
|
||||
0: Reverse<T, Prepend<T[Pos<I>], R>, Next<I>>;
|
||||
>0 : Reverse<T, [head: T[Length<I>], ...args: R], [head: any, ...args: I]>
|
||||
>0 : Reverse<T, [head: T[Pos<I>], ...args: R], [head: any, ...args: I]>
|
||||
|
||||
1: R;
|
||||
>1 : R
|
||||
@@ -128,12 +128,12 @@ declare namespace Tools {
|
||||
];
|
||||
|
||||
type Concat<T1 extends any[], T2 extends any[]> =
|
||||
>Concat : Reverse<Reverse<T1, [], []> extends infer R ? Cast<R, any[]> : never, T2, []>
|
||||
>Concat : Concat<T1, T2>
|
||||
|
||||
Reverse<Reverse<T1> extends infer R ? Cast<R, any[]> : never, T2>;
|
||||
|
||||
type Append<E, T extends any[]> =
|
||||
>Append : Reverse<Reverse<T, [], []> extends infer R ? Cast<R, any[]> : never, [E], []>
|
||||
>Append : Append<E, T>
|
||||
|
||||
Concat<T, [E]>;
|
||||
|
||||
@@ -168,7 +168,7 @@ declare namespace Curry {
|
||||
>Tools : any
|
||||
|
||||
1: Tools.Concat<TN, Tools.Drop<Tools.Pos<I>, T2> extends infer D ? Tools.Cast<D, any[]> : never>;
|
||||
>1 : Tools.Reverse<Tools.Reverse<TN, [], []> extends infer R ? Tools.Cast<R, any[]> : never, Tools.Drop<Tools.Length<I>, T2, []> extends infer D ? Tools.Cast<D, any[]> : never, []>
|
||||
>1 : Tools.Concat<TN, Tools.Drop<Tools.Pos<I>, T2, []> extends infer D ? Tools.Cast<D, any[]> : never>
|
||||
>Tools : any
|
||||
>Tools : any
|
||||
>Tools : any
|
||||
|
||||
@@ -8,7 +8,7 @@ declare module Test1 {
|
||||
|
||||
};
|
||||
export type IStringContainer = Container<string>;
|
||||
>IStringContainer : Container<string>
|
||||
>IStringContainer : IStringContainer
|
||||
}
|
||||
|
||||
declare module Test2 {
|
||||
@@ -20,7 +20,7 @@ declare module Test2 {
|
||||
|
||||
};
|
||||
export type IStringContainer = Container<string>;
|
||||
>IStringContainer : Container<string>
|
||||
>IStringContainer : IStringContainer
|
||||
}
|
||||
|
||||
var x: Test1.Container<number>;
|
||||
@@ -28,20 +28,20 @@ var x: Test1.Container<number>;
|
||||
>Test1 : any
|
||||
|
||||
var s1: Test1.IStringContainer;
|
||||
>s1 : Test1.Container<string>
|
||||
>s1 : Test1.IStringContainer
|
||||
>Test1 : any
|
||||
|
||||
var s2: Test2.IStringContainer;
|
||||
>s2 : Test2.Container<string>
|
||||
>s2 : Test2.IStringContainer
|
||||
>Test2 : any
|
||||
|
||||
s1 = s2;
|
||||
>s1 = s2 : Test2.Container<string>
|
||||
>s1 : Test1.Container<string>
|
||||
>s2 : Test2.Container<string>
|
||||
>s1 = s2 : Test2.IStringContainer
|
||||
>s1 : Test1.IStringContainer
|
||||
>s2 : Test2.IStringContainer
|
||||
|
||||
s2 = s1;
|
||||
>s2 = s1 : Test1.Container<string>
|
||||
>s2 : Test2.Container<string>
|
||||
>s1 : Test1.Container<string>
|
||||
>s2 = s1 : Test1.IStringContainer
|
||||
>s2 : Test2.IStringContainer
|
||||
>s1 : Test1.IStringContainer
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ declare module Test1 {
|
||||
|
||||
};
|
||||
export type IStringContainer = Container<string>;
|
||||
>IStringContainer : Container<string>
|
||||
>IStringContainer : IStringContainer
|
||||
}
|
||||
|
||||
declare module Test2 {
|
||||
@@ -20,7 +20,7 @@ declare module Test2 {
|
||||
|
||||
};
|
||||
export type IStringContainer = Container<string>;
|
||||
>IStringContainer : Container<string>
|
||||
>IStringContainer : IStringContainer
|
||||
}
|
||||
|
||||
var x: Test1.Container<number>;
|
||||
@@ -28,20 +28,20 @@ var x: Test1.Container<number>;
|
||||
>Test1 : any
|
||||
|
||||
var s1: Test1.IStringContainer;
|
||||
>s1 : Test1.Container<string>
|
||||
>s1 : Test1.IStringContainer
|
||||
>Test1 : any
|
||||
|
||||
var s2: Test2.IStringContainer;
|
||||
>s2 : Test2.Container<string>
|
||||
>s2 : Test2.IStringContainer
|
||||
>Test2 : any
|
||||
|
||||
s1 = s2;
|
||||
>s1 = s2 : Test2.Container<string>
|
||||
>s1 : Test1.Container<string>
|
||||
>s2 : Test2.Container<string>
|
||||
>s1 = s2 : Test2.IStringContainer
|
||||
>s1 : Test1.IStringContainer
|
||||
>s2 : Test2.IStringContainer
|
||||
|
||||
s2 = s1;
|
||||
>s2 = s1 : Test1.Container<string>
|
||||
>s2 : Test2.Container<string>
|
||||
>s1 : Test1.Container<string>
|
||||
>s2 = s1 : Test1.IStringContainer
|
||||
>s2 : Test2.IStringContainer
|
||||
>s1 : Test1.IStringContainer
|
||||
|
||||
|
||||
+6
-2
@@ -90,8 +90,9 @@ exports.__esModule = true;
|
||||
|
||||
|
||||
//// [/src/solution/lib/src/subProject2/index.d.ts]
|
||||
import { MyNominal } from '../subProject/index';
|
||||
declare const variable: {
|
||||
key: globalThis.MyNominal<string, "MyNominal">;
|
||||
key: MyNominal;
|
||||
};
|
||||
export declare function getVar(): keyof typeof variable;
|
||||
export {};
|
||||
@@ -136,7 +137,7 @@ exports.getVar = getVar;
|
||||
},
|
||||
"../src/subproject2/index.ts": {
|
||||
"version": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}",
|
||||
"signature": "-448645961-declare const variable: {\r\n key: globalThis.MyNominal<string, \"MyNominal\">;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"signature": "-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"affectsGlobalScope": false
|
||||
}
|
||||
},
|
||||
@@ -160,6 +161,9 @@ exports.getVar = getVar;
|
||||
"exportedModulesMap": {
|
||||
"../src/subproject/index.ts": [
|
||||
"../src/common/nominal.ts"
|
||||
],
|
||||
"../src/subproject2/index.ts": [
|
||||
"../src/subproject/index.ts"
|
||||
]
|
||||
},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
|
||||
+6
-2
@@ -200,8 +200,9 @@ exports.__esModule = true;
|
||||
}
|
||||
|
||||
//// [/src/solution/lib/src/subProject2/index.d.ts]
|
||||
import { MyNominal } from '../subProject/index';
|
||||
declare const variable: {
|
||||
key: globalThis.MyNominal<string, "MyNominal">;
|
||||
key: MyNominal;
|
||||
};
|
||||
export declare function getVar(): keyof typeof variable;
|
||||
export {};
|
||||
@@ -246,7 +247,7 @@ exports.getVar = getVar;
|
||||
},
|
||||
"../../../src/subproject2/index.ts": {
|
||||
"version": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}",
|
||||
"signature": "-448645961-declare const variable: {\r\n key: globalThis.MyNominal<string, \"MyNominal\">;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"signature": "-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"affectsGlobalScope": false
|
||||
}
|
||||
},
|
||||
@@ -273,6 +274,9 @@ exports.getVar = getVar;
|
||||
],
|
||||
"../subproject/index.d.ts": [
|
||||
"../common/nominal.d.ts"
|
||||
],
|
||||
"../../../src/subproject2/index.ts": [
|
||||
"../subproject/index.d.ts"
|
||||
]
|
||||
},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
|
||||
+4
-3
@@ -238,8 +238,9 @@ exports.__esModule = true;
|
||||
}
|
||||
|
||||
//// [/src/lib/solution/sub-project-2/index.d.ts]
|
||||
import { MyNominal } from '../sub-project/index';
|
||||
declare const variable: {
|
||||
key: import("../common/nominal").Nominal<string, "MyNominal">;
|
||||
key: MyNominal;
|
||||
};
|
||||
export declare function getVar(): keyof typeof variable;
|
||||
export {};
|
||||
@@ -279,7 +280,7 @@ exports.getVar = getVar;
|
||||
},
|
||||
"../../../solution/sub-project-2/index.ts": {
|
||||
"version": "-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n",
|
||||
"signature": "-17233212183-declare const variable: {\r\n key: import(\"../common/nominal\").Nominal<string, \"MyNominal\">;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"signature": "881159974-import { MyNominal } from '../sub-project/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n",
|
||||
"affectsGlobalScope": false
|
||||
}
|
||||
},
|
||||
@@ -303,7 +304,7 @@ exports.getVar = getVar;
|
||||
"../common/nominal.d.ts"
|
||||
],
|
||||
"../../../solution/sub-project-2/index.ts": [
|
||||
"../common/nominal.d.ts"
|
||||
"../sub-project/index.d.ts"
|
||||
]
|
||||
},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
|
||||
Reference in New Issue
Block a user