/third_party/typescript/tests/baselines/reference/ |
D | typeSatisfaction.types | 18 const t1 = { a: 1 } satisfies I1; // Ok 20 >{ a: 1 } satisfies I1 : { a: number; } 25 const t2 = { a: 1, b: 1 } satisfies I1; // Error 27 >{ a: 1, b: 1 } satisfies I1 : { a: number; b: number; } 34 const t3 = { } satisfies I1; // Error 36 >{ } satisfies I1 : {} 39 const t4: T1 = { a: "a" } satisfies T1; // Ok 41 >{ a: "a" } satisfies T1 : { a: "a"; } 46 const t5 = (m => m.substring(0)) satisfies T2; // Ok 48 >(m => m.substring(0)) satisfies T2 : (m: string) => string [all …]
|
D | typeSatisfaction.js | 12 const t1 = { a: 1 } satisfies I1; // Ok 13 const t2 = { a: 1, b: 1 } satisfies I1; // Error 14 const t3 = { } satisfies I1; // Error 16 const t4: T1 = { a: "a" } satisfies T1; // Ok 17 const t5 = (m => m.substring(0)) satisfies T2; // Ok 19 const t6 = [1, 2] satisfies [number, number]; 24 let t7 = { a: 'test' } satisfies A; 25 let t8 = { a: 'test', b: 'test' } satisfies A;
|
D | typePredicateFreshLiteralWidening.js | 8 const satisfies = constant 19 const item1 = satisfies<Item>()({ value: "1" }); 20 const item2 = satisfies<Item>()({ value: "2" }); 21 const item3 = satisfies<Item>()({ value: null }); 31 var satisfies = function () { function 38 var item1 = satisfies()({ value: "1" }); 39 var item2 = satisfies()({ value: "2" }); 40 var item3 = satisfies()({ value: null });
|
D | typePredicateFreshLiteralWidening.types | 11 const satisfies = 12 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow> 40 const item1 = satisfies<Item>()({ value: "1" }); 42 >satisfies<Item>()({ value: "1" }) : { value: "1"; } 43 >satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow> 44 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow> 49 const item2 = satisfies<Item>()({ value: "2" }); 51 >satisfies<Item>()({ value: "2" }) : { value: "2"; } 52 >satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow> 53 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow> [all …]
|
D | typePredicateFreshLiteralWidening.symbols | 21 const satisfies = 22 >satisfies : Symbol(satisfies, Decl(typePredicateFreshLiteralWidening.ts, 6, 5)) 52 const item1 = satisfies<Item>()({ value: "1" }); 54 >satisfies : Symbol(satisfies, Decl(typePredicateFreshLiteralWidening.ts, 6, 5)) 58 const item2 = satisfies<Item>()({ value: "2" }); 60 >satisfies : Symbol(satisfies, Decl(typePredicateFreshLiteralWidening.ts, 6, 5)) 64 const item3 = satisfies<Item>()({ value: null }); 66 >satisfies : Symbol(satisfies, Decl(typePredicateFreshLiteralWidening.ts, 6, 5))
|
D | typeSatisfaction.errors.txt | 20 const t1 = { a: 1 } satisfies I1; // Ok 21 const t2 = { a: 1, b: 1 } satisfies I1; // Error 25 const t3 = { } satisfies I1; // Error 31 const t4: T1 = { a: "a" } satisfies T1; // Ok 32 const t5 = (m => m.substring(0)) satisfies T2; // Ok 34 const t6 = [1, 2] satisfies [number, number]; 39 let t7 = { a: 'test' } satisfies A; 40 let t8 = { a: 'test', b: 'test' } satisfies A;
|
D | typeSatisfaction.symbols | 20 const t1 = { a: 1 } satisfies I1; // Ok 25 const t2 = { a: 1, b: 1 } satisfies I1; // Error 31 const t3 = { } satisfies I1; // Error 35 const t4: T1 = { a: "a" } satisfies T1; // Ok 41 const t5 = (m => m.substring(0)) satisfies T2; // Ok 49 const t6 = [1, 2] satisfies [number, number]; 58 let t7 = { a: 'test' } satisfies A; 63 let t8 = { a: 'test', b: 'test' } satisfies A;
|
D | typeSatisfactionWithDefaultExport.types | 6 export default {} satisfies Foo; 7 >{} satisfies Foo : {} 15 export default { a: 1 } satisfies Foo; 16 >{ a: 1 } satisfies Foo : { a: number; }
|
D | typeSatisfaction_vacuousIntersectionOfContextualTypes.types | 2 const a: "baz" = "foo" satisfies "foo" | "bar"; 4 >"foo" satisfies "foo" | "bar" : "foo" 7 const b: { xyz: "baz" } = { xyz: "foo" } satisfies { xyz: "foo" | "bar" }; 10 >{ xyz: "foo" } satisfies { xyz: "foo" | "bar" } : { xyz: "foo"; }
|
D | typeSatisfaction_contextualTyping2.types | 6 >{ f(s) { }, // "incorrect" implicit any on 's' g(s) { }} satisfies { g(s: string): void } & … 17 } satisfies { g(s: string): void } & Record<string, unknown>; 22 ({ f(x) { } }) satisfies { f(s: string): void }; 23 >({ f(x) { } }) satisfies { f(s: string): void } : { f(x: string): void; }
|
D | typeSatisfaction_vacuousIntersectionOfContextualTypes.js | 2 const a: "baz" = "foo" satisfies "foo" | "bar"; 3 const b: { xyz: "baz" } = { xyz: "foo" } satisfies { xyz: "foo" | "bar" };
|
D | typeSatisfactionWithDefaultExport.js | 7 export default {} satisfies Foo; 13 export default { a: 1 } satisfies Foo;
|
D | typeSatisfaction_js.types | 2 var v = undefined satisfies 1; 4 >undefined satisfies 1 : undefined
|
D | typeSatisfaction_contextualTyping2.js | 5 } satisfies { g(s: string): void } & Record<string, unknown>; 8 ({ f(x) { } }) satisfies { f(s: string): void };
|
D | satisfiesEmit.types | 6 const p = a satisfies bleh; 8 >a satisfies bleh : bleh
|
/third_party/typescript/tests/cases/conformance/expressions/typeSatisfaction/ |
D | typeSatisfaction.ts | 11 const t1 = { a: 1 } satisfies I1; // Ok 12 const t2 = { a: 1, b: 1 } satisfies I1; // Error 13 const t3 = { } satisfies I1; // Error 15 const t4: T1 = { a: "a" } satisfies T1; // Ok 16 const t5 = (m => m.substring(0)) satisfies T2; // Ok 18 const t6 = [1, 2] satisfies [number, number]; 23 let t7 = { a: 'test' } satisfies A; 24 let t8 = { a: 'test', b: 'test' } satisfies A;
|
D | typeSatisfaction_vacuousIntersectionOfContextualTypes.ts | 1 const a: "baz" = "foo" satisfies "foo" | "bar"; constant 2 const b: { xyz: "baz" } = { xyz: "foo" } satisfies { xyz: "foo" | "bar" };
|
D | typeSatisfactionWithDefaultExport.ts | 7 export default {} satisfies Foo; 13 export default { a: 1 } satisfies Foo;
|
D | typeSatisfaction_contextualTyping2.ts | 6 } satisfies { g(s: string): void } & Record<string, unknown>; variable 9 ({ f(x) { } }) satisfies { f(s: string): void };
|
/third_party/typescript/tests/cases/compiler/ |
D | typePredicateFreshLiteralWidening.ts | 9 const satisfies = constant 20 const item1 = satisfies<Item>()({ value: "1" }); 21 const item2 = satisfies<Item>()({ value: "2" }); 22 const item3 = satisfies<Item>()({ value: null });
|
/third_party/node/deps/npm/node_modules/@npmcli/fs/lib/common/ |
D | node.js | 3 const satisfies = (range) => { function 4 return semver.satisfies(process.version, range, { includePrerelease: true }) 8 satisfies, property
|
/third_party/node/deps/npm/node_modules/semver/ranges/ |
D | subset.js | 4 const satisfies = require('../functions/satisfies.js') constant 125 if (gt && !satisfies(eq, String(gt), options)) { 129 if (lt && !satisfies(eq, String(lt), options)) { 134 if (!satisfies(eq, String(c), options)) { 175 } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { 193 } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
|
/third_party/node/deps/npm/node_modules/@npmcli/arborist/lib/ |
D | override-set.js | 94 if (semver.satisfies(node.version, rule.keySpec) || 95 semver.satisfies(node.version, rule.value)) { 109 if (semver.satisfies(node.version, rule.keySpec) || 110 semver.satisfies(node.version, rule.value)) {
|
D | can-place-dep.js | 112 this.edgeOverride = !dep.satisfies(edge) 152 !dep.satisfies(targetEdge) && 166 if (current.satisfies(edge) || this.edgeOverride) { 186 if (current.satisfies(edge) && (!explicitRequest || preferDedupe)) { 275 if (!rep.satisfies(edge)) { 324 if (!dep.satisfies(edge)) {
|
/third_party/node/deps/npm/node_modules/semver/functions/ |
D | satisfies.js | 2 const satisfies = (version, range, options) => { function 10 module.exports = satisfies
|