/third_party/typescript/tests/baselines/reference/ |
D | mappedTypes5.types | 2 function f<T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) { 3 >f : <T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) => void 5 >r : Readonly<T> 6 >pr : Partial<Readonly<T>> 7 >rp : Readonly<Partial<T>> 15 >r : Readonly<T> 19 >pr : Partial<Readonly<T>> 23 >rp : Readonly<Partial<T>> 25 let b1: Readonly<T> = p; // Error 26 >b1 : Readonly<T> [all …]
|
D | mappedTypes5.errors.txt | 1 …pped/mappedTypes5.ts(6,9): error TS2322: Type 'Partial<T>' is not assignable to type 'Readonly<T>'. 2 …d/mappedTypes5.ts(8,9): error TS2322: Type 'Partial<Readonly<T>>' is not assignable to type 'Reado… 3 …apped/mappedTypes5.ts(9,9): error TS2322: Type 'Readonly<Partial<T>>' is not assignable to type 'R… 7 … function f<T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) { 12 let b1: Readonly<T> = p; // Error 14 !!! error TS2322: Type 'Partial<T>' is not assignable to type 'Readonly<T>'. 15 let b2: Readonly<T> = r; 16 let b3: Readonly<T> = pr; // Error 18 !!! error TS2322: Type 'Partial<Readonly<T>>' is not assignable to type 'Readonly<T>'. 19 let b4: Readonly<T> = rp; // Error [all …]
|
D | mappedTypes5.js | 2 function f<T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) { 7 let b1: Readonly<T> = p; // Error 8 let b2: Readonly<T> = r; 9 let b3: Readonly<T> = pr; // Error 10 let b4: Readonly<T> = rp; // Error 11 let c1: Partial<Readonly<T>> = p; 12 let c2: Partial<Readonly<T>> = r; 13 let c3: Partial<Readonly<T>> = pr; 14 let c4: Partial<Readonly<T>> = rp; 15 let d1: Readonly<Partial<T>> = p; [all …]
|
D | homomorphicMappedTypeIntersectionAssignability.types | 3 …ype>(a: { weak?: string;} & Readonly<TType> & { name: "ok";}, b: Readonly<TType & { name:… 5 a: { weak?: string } & Readonly<TType> & { name: "ok" }, 6 >a : { weak?: string | undefined; } & Readonly<TType> & { name: "ok"; } 10 b: Readonly<TType & { name: string }>, 11 >b : Readonly<TType & { name: string; }> 14 c: Readonly<TType> & { name: string }) { 15 >c : Readonly<TType> & { name: string; } 19 >c = a : { weak?: string | undefined; } & Readonly<TType> & { name: "ok"; } 20 >c : Readonly<TType> & { name: string; } 21 >a : { weak?: string | undefined; } & Readonly<TType> & { name: "ok"; } [all …]
|
D | mappedTypes5.symbols | 2 function f<T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) { 9 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 13 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 16 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 44 let b1: Readonly<T> = p; // Error 46 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 50 let b2: Readonly<T> = r; 52 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 56 let b3: Readonly<T> = pr; // Error 58 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) [all …]
|
D | strictNullNotNullIndexTypeNoLib.types | 2 type Readonly<T> = {readonly [K in keyof T]: T[K]} 3 >Readonly : Readonly<T> 14 attrs: Readonly<T>; 15 >attrs : Readonly<T> 24 >this.attrs : Readonly<T> 26 >attrs : Readonly<T> 40 properties: Readonly<P>; 41 >properties : Readonly<P> 49 >this.properties : Readonly<P> 51 >properties : Readonly<P> [all …]
|
D | spellingSuggestionJSXAttribute.errors.txt | 10 …Overload 1 of 2, '(props: Readonly<{ className?: string; htmlFor?: string; }>): MyComp', gave the … 11 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 12 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 14 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 15 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 19 …Overload 1 of 2, '(props: Readonly<{ className?: string; htmlFor?: string; }>): MyComp', gave the … 20 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 21 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 23 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… 24 …insicAttributes & IntrinsicClassAttributes<MyComp> & Readonly<{ children?: ReactNode; }> & Readonl… [all …]
|
D | strictNullNotNullIndexTypeShouldWork.types | 11 attrs: Readonly<T>; 12 >attrs : Readonly<T> 21 >this.attrs : Readonly<T> 23 >attrs : Readonly<T> 37 properties: Readonly<P>; 38 >properties : Readonly<P> 46 >this.properties : Readonly<P> 48 >properties : Readonly<P> 58 attrs: Readonly<T>; 59 >attrs : Readonly<T> [all …]
|
D | reactDefaultPropsInferenceSuccess.errors.txt | 2 Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error. 9 Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error. 16 …Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the followi… 53 !!! error TS2769: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the fol… 59 …& Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick… 60 …& Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick… 79 !!! error TS2769: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the… 85 …ps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Read… 86 …ps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Read… 110 !!! error TS2769: Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>… [all …]
|
D | complicatedIndexesOfIntersectionsAreInferencable.types | 15 …Readonly<FormikConfig<Values> & ExtraProps> : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "v… 18 …Readonly<FormikConfig<Values> & ExtraProps> : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "v… 20 ? Readonly<FormikConfig<Values> & ExtraProps> 21 …: Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validate" | "initialValues" | Exclude<keyof E… 22 …& Partial<Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validateOnChange" | Extract<keyof Ext… 27 …Readonly<FormikConfig<Values> & ExtraProps> : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "v…
|
D | homomorphicMappedTypeIntersectionAssignability.symbols | 6 a: { weak?: string } & Readonly<TType> & { name: "ok" }, 9 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 13 b: Readonly<TType & { name: string }>, 15 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 19 c: Readonly<TType> & { name: string }) { 21 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
|
D | thisIndexOnExistingReadonlyFieldIsNotNever.types | 5 readonly props: Readonly<{ children?: unknown }> & Readonly<P>; 6 >props : Readonly<{ children?: unknown; }> & Readonly<P> 9 state: Readonly<S>; 10 >state : Readonly<S> 40 >this.props : Readonly<{ children?: unknown; }> & Readonly<CoachMarkAnchorProps<AnchorType<P>> & P> 42 >props : Readonly<{ children?: unknown; }> & Readonly<CoachMarkAnchorProps<AnchorType<P>> & P>
|
D | mappedTypesAndObjects.types | 2 function f1<T>(x: Partial<T>, y: Readonly<T>) { 3 >f1 : <T>(x: Partial<T>, y: Readonly<T>) => void 5 >y : Readonly<T> 16 >obj = y : Readonly<T> 18 >y : Readonly<T> 21 function f2<T>(x: Partial<T>, y: Readonly<T>) { 22 >f2 : <T>(x: Partial<T>, y: Readonly<T>) => void 24 >y : Readonly<T> 36 >obj = y : Readonly<T> 38 >y : Readonly<T>
|
D | readonlyAssignmentInSubclassOfClassExpression.types | 2 class C extends (class {} as new () => Readonly<{ attrib: number }>) { 4 >(class {} as new () => Readonly<{ attrib: number }>) : Readonly<{ attrib: number; }> 5 >class {} as new () => Readonly<{ attrib: number }> : new () => Readonly<{ attrib: number;}> 12 >super : new () => Readonly<{ attrib: number; }>
|
D | mappedTypeRelationships.types | 224 function f20<T>(x: T, y: Readonly<T>, k: keyof T) { 225 >f20 : <T>(x: T, y: Readonly<T>, k: keyof T) => void 227 >y : Readonly<T> 231 >x[k] = y[k] : Readonly<T>[keyof T] 235 >y[k] : Readonly<T>[keyof T] 236 >y : Readonly<T> 241 >y[k] : Readonly<T>[keyof T] 242 >y : Readonly<T> 249 function f21<T, K extends keyof T>(x: T, y: Readonly<T>, k: K) { 250 >f21 : <T, K extends keyof T>(x: T, y: Readonly<T>, k: K) => void [all …]
|
D | inferrenceInfiniteLoopWithSubtyping.types | 2 export type ObjMapReadOnly<T> = Readonly<{ [key: string]: Readonly<T> }>; 3 >ObjMapReadOnly : Readonly<{ [key: string]: Readonly<T>; }> 9 export type ComposeOutputTypeDefinition = Readonly<ObjectTypeComposer<any, any> | EnumTypeComposer>; 27 >fields : Readonly<{ [key: string]: Readonly<Resolver>; }> 39 >wrapArgs : <NewContext>(cb: () => { [argName: string]: Thunk<Readonly<EnumTypeComposer>>; }) => vo… 42 >cb : () => { [argName: string]: Thunk<Readonly<EnumTypeComposer>>; } 44 [argName: string]: Thunk<Readonly<EnumTypeComposer>>;
|
D | strictNullNotNullIndexTypeNoLib.symbols | 2 type Readonly<T> = {readonly [K in keyof T]: T[K]} 3 >Readonly : Symbol(Readonly, Decl(strictNullNotNullIndexTypeNoLib.ts, 0, 0)) 23 attrs: Readonly<T>; 25 >Readonly : Symbol(Readonly, Decl(strictNullNotNullIndexTypeNoLib.ts, 0, 0)) 53 properties: Readonly<P>; 55 >Readonly : Symbol(Readonly, Decl(strictNullNotNullIndexTypeNoLib.ts, 0, 0)) 77 attrs: Readonly<T>; 79 >Readonly : Symbol(Readonly, Decl(strictNullNotNullIndexTypeNoLib.ts, 0, 0))
|
D | objectFreeze.types | 5 >Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>… 7 >freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } 29 >Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>… 31 >freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } 42 >Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>… 44 >freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } 63 >o : Readonly<{ a: number; b: string; }> 64 >Object.freeze({ a: 1, b: "string" }) : Readonly<{ a: number; b: string; }> 65 >Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>… 67 >freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } [all …]
|
D | jsEnumTagOnObjectFrozen.types | 3 >Thing : Readonly<{ a: string; b: string; }> 14 >Thing : Readonly<{ a: string; b: string; }> 50 >Thing : Readonly<{ a: string; b: string; }> 51 >Object.freeze({ a: "thing", b: "chill"}) : Readonly<{ a: string; b: string; }> 52 >Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>… 54 >freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } 68 >exports.Thing = Thing : Readonly<{ a: string; b: string; }> 69 >exports.Thing : Readonly<{ a: string; b: string; }> 71 >Thing : Readonly<{ a: string; b: string; }> 72 >Thing : Readonly<{ a: string; b: string; }>
|
D | complicatedIndexesOfIntersectionsAreInferencable.symbols | 28 ? Readonly<FormikConfig<Values> & ExtraProps> 29 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 34 …: Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validate" | "initialValues" | Exclude<keyof E… 36 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 43 …& Partial<Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validateOnChange" | Extract<keyof Ext… 46 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
|
D | thisIndexOnExistingReadonlyFieldIsNotNever.symbols | 7 readonly props: Readonly<{ children?: unknown }> & Readonly<P>; 9 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 11 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) 14 state: Readonly<S>; 16 >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
|
/third_party/typescript/tests/cases/conformance/types/mapped/ |
D | mappedTypes5.ts | 3 function f<T>(p: Partial<T>, r: Readonly<T>, pr: Partial<Readonly<T>>, rp: Readonly<Partial<T>>) { 8 let b1: Readonly<T> = p; // Error 9 let b2: Readonly<T> = r; 10 let b3: Readonly<T> = pr; // Error 11 let b4: Readonly<T> = rp; // Error 12 let c1: Partial<Readonly<T>> = p; 13 let c2: Partial<Readonly<T>> = r; 14 let c3: Partial<Readonly<T>> = pr; 15 let c4: Partial<Readonly<T>> = rp; 16 let d1: Readonly<Partial<T>> = p; [all …]
|
D | mappedTypeModifiers.ts | 28 var v03: Readonly<T>; 35 var v04: Readonly<TP>; 36 var v04: Partial<Readonly<T>>; 37 var v04: Readonly<Partial<T>>; 67 var b03: Readonly<B>; 74 var b04: Readonly<BP>; 75 var b04: Partial<Readonly<B>>; 76 var b04: Readonly<Partial<B>>; 87 function f2(x: Readonly<Foo>) {
|
/third_party/typescript_eslint/packages/experimental-utils/src/ts-eslint/ |
D | RuleTester.ts | 6 interface ValidTestCase<TOptions extends Readonly<unknown[]>> { 14 readonly env?: Readonly<Record<string, boolean>>; 26 readonly options?: Readonly<TOptions>; 34 readonly parserOptions?: Readonly<ParserOptions>; 38 readonly settings?: Readonly<Record<string, unknown>>; 49 readonly data?: Readonly<Record<string, unknown>>; 62 TOptions extends Readonly<unknown[]> 82 readonly data?: Readonly<Record<string, unknown>>; 114 TOptions extends Readonly<unknown[]> 123 readonly parserOptions?: Readonly<ParserOptions>; [all …]
|
/third_party/typescript_eslint/packages/eslint-plugin/src/util/ |
D | isTypeReadonly.ts | 17 Readonly = 3, enumerator 31 return Readonlyness.Readonly; 44 return Readonlyness.Readonly; 80 ? Readonlyness.Readonly 133 return Readonlyness.Readonly; 141 ): Readonlyness.Readonly | Readonlyness.Mutable { 149 const readonlyness = result ? Readonlyness.Readonly : Readonlyness.Mutable; 156 return Readonlyness.Readonly; 164 return Readonlyness.Readonly; 187 isTypeReadonlyRecurser(checker, type, new Set()) === Readonlyness.Readonly
|