Home
last modified time | relevance | path

Searched refs:satisfies (Results 1 – 25 of 245) sorted by relevance

12345678910

/third_party/typescript/tests/baselines/reference/
DtypeSatisfaction.types18 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 …]
DtypeSatisfaction.js12 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;
DtypePredicateFreshLiteralWidening.js8 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 });
DtypePredicateFreshLiteralWidening.types11 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 …]
DtypePredicateFreshLiteralWidening.symbols21 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))
DtypeSatisfaction.errors.txt20 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;
DtypeSatisfaction.symbols20 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;
DtypeSatisfactionWithDefaultExport.types6 export default {} satisfies Foo;
7 >{} satisfies Foo : {}
15 export default { a: 1 } satisfies Foo;
16 >{ a: 1 } satisfies Foo : { a: number; }
DtypeSatisfaction_vacuousIntersectionOfContextualTypes.types2 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"; }
DtypeSatisfaction_contextualTyping2.types6 >{ 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; }
DtypeSatisfaction_vacuousIntersectionOfContextualTypes.js2 const a: "baz" = "foo" satisfies "foo" | "bar";
3 const b: { xyz: "baz" } = { xyz: "foo" } satisfies { xyz: "foo" | "bar" };
DtypeSatisfactionWithDefaultExport.js7 export default {} satisfies Foo;
13 export default { a: 1 } satisfies Foo;
DtypeSatisfaction_js.types2 var v = undefined satisfies 1;
4 >undefined satisfies 1 : undefined
DtypeSatisfaction_contextualTyping2.js5 } satisfies { g(s: string): void } & Record<string, unknown>;
8 ({ f(x) { } }) satisfies { f(s: string): void };
DsatisfiesEmit.types6 const p = a satisfies bleh;
8 >a satisfies bleh : bleh
/third_party/typescript/tests/cases/conformance/expressions/typeSatisfaction/
DtypeSatisfaction.ts11 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;
DtypeSatisfaction_vacuousIntersectionOfContextualTypes.ts1 const a: "baz" = "foo" satisfies "foo" | "bar"; constant
2 const b: { xyz: "baz" } = { xyz: "foo" } satisfies { xyz: "foo" | "bar" };
DtypeSatisfactionWithDefaultExport.ts7 export default {} satisfies Foo;
13 export default { a: 1 } satisfies Foo;
DtypeSatisfaction_contextualTyping2.ts6 } satisfies { g(s: string): void } & Record<string, unknown>; variable
9 ({ f(x) { } }) satisfies { f(s: string): void };
/third_party/typescript/tests/cases/compiler/
DtypePredicateFreshLiteralWidening.ts9 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/
Dnode.js3 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/
Dsubset.js4 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/
Doverride-set.js94 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)) {
Dcan-place-dep.js112 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/
Dsatisfies.js2 const satisfies = (version, range, options) => { function
10 module.exports = satisfies

12345678910