Home
last modified time | relevance | path

Searched refs:K1 (Results 1 – 25 of 147) sorted by relevance

123456

/third_party/typescript/tests/baselines/reference/
DtwiceNestedKeyofIndexInference.types2 type Set1<T, K1 extends keyof T> = T extends any[] ? T : Pick<T, Exclude<keyof T, K1>> & {
3 >Set1 : Set1<T, K1>
5 [SK1 in K1]-?: Required<Pick<T, SK1>>;
6 }[K1];
8 type Set2<T, K1 extends keyof T, K2 extends keyof T[K1]> = T extends any[] ? T : Pick<T, Exclude<ke…
9 >Set2 : Set2<T, K1, K2>
11 [SK1 in K1]-?: Required<{
12 [key in K1]: Set1<T[K1], K2>;
14 }[K1];
16 declare function set<T, K1 extends keyof T>(source: T, path: [K1], value: T[K1]): Set1<T, K1>;
[all …]
DdeepKeysIndexing.types14 >keys2broken : keys2broken<O, K1>
17 K1 extends keyof O
18 > = O[K1] extends object ? Extract<keyof O[K1], string> : never;
21 >keys2working : keys2working<O, K1>
24 K1 extends keyof O
25 > = O[K1] extends object ? keyof O[K1] : never;
27 type keys2workaround<O extends DeepObject, K1 extends keyof O> = Extract<
28 >keys2workaround : keys2workaround<O, K1>
30 O[K1] extends object ? keyof O[K1] : never,
54 >broken : <K1 extends keyof O, K2 extends keys2broken<O, K1>, V extends O[K1][K2]>(k1: K1, k2: K2, …
[all …]
DtwiceNestedKeyofIndexInference.symbols2 type Set1<T, K1 extends keyof T> = T extends any[] ? T : Pick<T, Exclude<keyof T, K1>> & {
5 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 0, 12))
13 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 0, 12))
15 [SK1 in K1]-?: Required<Pick<T, SK1>>;
17 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 0, 12))
23 }[K1];
24 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 0, 12))
26 type Set2<T, K1 extends keyof T, K2 extends keyof T[K1]> = T extends any[] ? T : Pick<T, Exclude<ke…
29 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 4, 12))
33 >K1 : Symbol(K1, Decl(twiceNestedKeyofIndexInference.ts, 4, 12))
[all …]
DdeepKeysIndexing.symbols22 K1 extends keyof O
23 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 8, 23))
26 > = O[K1] extends object ? Extract<keyof O[K1], string> : never;
28 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 8, 23))
31 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 8, 23))
40 K1 extends keyof O
41 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 13, 23))
44 > = O[K1] extends object ? keyof O[K1] : never;
46 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 13, 23))
48 >K1 : Symbol(K1, Decl(deepKeysIndexing.ts, 13, 23))
[all …]
DdeepComparisons.errors.txt2 …mpiler/deepComparisons.ts(3,9): error TS2322: Type 'T[K1]' is not assignable to type 'Extract<T[K1
3 Type 'T[keyof T]' is not assignable to type 'Extract<T[K1], string>'.
4 Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'Extract<T[K1], string>'.
5 Type 'T[string]' is not assignable to type 'Extract<T[K1], string>'.
6 …iler/deepComparisons.ts(4,9): error TS2322: Type 'T[K1][K2]' is not assignable to type 'Extract<T[
7 Type 'T[K1][keyof T[K1]]' is not assignable to type 'Extract<T[K1][K2], string>'.
8 …Type 'T[K1][string] | T[K1][number] | T[K1][symbol]' is not assignable to type 'Extract<T[K1][K2],…
9 Type 'T[K1][string]' is not assignable to type 'Extract<T[K1][K2], string>'.
10 Type 'T[keyof T][string]' is not assignable to type 'Extract<T[K1][K2], string>'.
11 …g] | T[number][string] | T[symbol][string]' is not assignable to type 'Extract<T[K1][K2], string>'.
[all …]
DtwiceNestedKeyofIndexInference.js2 type Set1<T, K1 extends keyof T> = T extends any[] ? T : Pick<T, Exclude<keyof T, K1>> & {
3 [SK1 in K1]-?: Required<Pick<T, SK1>>;
4 }[K1];
6 type Set2<T, K1 extends keyof T, K2 extends keyof T[K1]> = T extends any[] ? T : Pick<T, Exclude<ke…
7 [SK1 in K1]-?: Required<{
8 [key in K1]: Set1<T[K1], K2>;
10 }[K1];
12 declare function set<T, K1 extends keyof T>(source: T, path: [K1], value: T[K1]): Set1<T, K1>;
14 declare function set<T, K1 extends keyof T, K2 extends keyof T[K1]>(source: T, path: [K1, K2], valu…
DdeepKeysIndexing.js11 K1 extends keyof O
12 > = O[K1] extends object ? Extract<keyof O[K1], string> : never;
16 K1 extends keyof O
17 > = O[K1] extends object ? keyof O[K1] : never;
19 type keys2workaround<O extends DeepObject, K1 extends keyof O> = Extract<
20 O[K1] extends object ? keyof O[K1] : never,
34 K1 extends keyof O, field in Bar
35 K2 extends keys2broken<O, K1>, field in Bar
36 V extends O[K1][K2]
37 >(k1: K1, k2: K2, value: V) {}
[all …]
DdeepKeysIndexing.errors.txt16 K1 extends keyof O
17 > = O[K1] extends object ? Extract<keyof O[K1], string> : never;
21 K1 extends keyof O
22 > = O[K1] extends object ? keyof O[K1] : never;
24 type keys2workaround<O extends DeepObject, K1 extends keyof O> = Extract<
25 O[K1] extends object ? keyof O[K1] : never,
39 K1 extends keyof O,
40 K2 extends keys2broken<O, K1>,
41 V extends O[K1][K2]
42 >(k1: K1, k2: K2, value: V) {}
[all …]
Dqualify.types75 export module K1 {
91 var v2:K1.I3=v1;
92 >v2 : K1.I3
93 >K1 : any
96 var v3:K1.I3[]=v1;
97 >v3 : K1.I3[]
98 >K1 : any
101 var v4:()=>K1.I3=v1;
102 >v4 : () => K1.I3
103 >K1 : any
[all …]
Dqualify.symbols76 export module K1 {
77 >K1 : Symbol(K1, Decl(qualify.ts, 33, 16))
99 var v2:K1.I3=v1;
101 >K1 : Symbol(K1, Decl(qualify.ts, 33, 16))
102 >I3 : Symbol(K1.I3, Decl(qualify.ts, 34, 22))
105 var v3:K1.I3[]=v1;
107 >K1 : Symbol(K1, Decl(qualify.ts, 33, 16))
108 >I3 : Symbol(K1.I3, Decl(qualify.ts, 34, 22))
111 var v4:()=>K1.I3=v1;
113 >K1 : Symbol(K1, Decl(qualify.ts, 33, 16))
[all …]
DgenericObjectRest.types75 function f3<T, K1 extends keyof T, K2 extends keyof T>(obj: T, k1: K1, k2: K2) {
76 >f3 : <T, K1 extends keyof T, K2 extends keyof T>(obj: T, k1: K1, k2: K2) => void
78 >k1 : K1
82 >k1 : K1
83 >a1 : T[K1]
86 >r1 : Omit<T, K1 | K2>
96 function f4<K1 extends keyof Item, K2 extends keyof Item>(obj: Item, k1: K1, k2: K2) {
97 >f4 : <K1 extends keyof Item, K2 extends keyof Item>(obj: Item, k1: K1, k2: K2) => void
99 >k1 : K1
103 >k1 : K1
[all …]
DdeepComparisons.types2 function f1<T, K1 extends keyof T, K2 extends keyof T[K1]>() {
3 >f1 : <T, K1 extends keyof T, K2 extends keyof T[K1]>() => void
11 let v2: Extract<T[K1], string> = 0 as any as T[K1]; // Error
12 >v2 : Extract<T[K1], string>
13 >0 as any as T[K1] : T[K1]
17 let v3: Extract<T[K1][K2], string> = 0 as any as T[K1][K2]; // No error
18 >v3 : Extract<T[K1][K2], string>
19 >0 as any as T[K1][K2] : T[K1][K2]
DdeepComparisons.symbols2 function f1<T, K1 extends keyof T, K2 extends keyof T[K1]>() {
5 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
9 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
17 let v2: Extract<T[K1], string> = 0 as any as T[K1]; // Error
21 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
23 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
25 let v3: Extract<T[K1][K2], string> = 0 as any as T[K1][K2]; // No error
29 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
32 >K1 : Symbol(K1, Decl(deepComparisons.ts, 0, 14))
DkeyofAndIndexedAccess.types1403 function path<T, K1 extends keyof T>(obj: T, key1: K1): T[K1];
1404K1 extends keyof T>(obj: T, key1: K1): T[K1]; <T, K1 extends keyof T, K2 extends keyof T[K1]>(obj:…
1406 >key1 : K1
1408 function path<T, K1 extends keyof T, K2 extends keyof T[K1]>(obj: T, key1: K1, key2: K2): T[K1][K2];
1409K1 extends keyof T>(obj: T, key1: K1): T[K1]; <T, K1 extends keyof T, K2 extends keyof T[K1]>(obj:…
1411 >key1 : K1
1414 function path<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(obj: T, ke…
1415K1 extends keyof T>(obj: T, key1: K1): T[K1]; <T, K1 extends keyof T, K2 extends keyof T[K1]>(obj:…
1417 >key1 : K1
1422K1 extends keyof T>(obj: T, key1: K1): T[K1]; <T, K1 extends keyof T, K2 extends keyof T[K1]>(obj:…
[all …]
DtypeUsedAsTypeLiteralIndex.symbols12 const K1 = Symbol();
13 >K1 : Symbol(K1, Decl(typeUsedAsTypeLiteralIndex.ts, 5, 5))
19 [K1]: number;
20 >[K1] : Symbol([K1], Decl(typeUsedAsTypeLiteralIndex.ts, 6, 11))
21 >K1 : Symbol(K1, Decl(typeUsedAsTypeLiteralIndex.ts, 5, 5))
DtypeUsedAsTypeLiteralIndex.types13 const K1 = Symbol();
14 >K1 : unique symbol
19 >T1 : { [K1]: number; }
21 [K1]: number;
22 >[K1] : number
23 >K1 : unique symbol
DdeepComparisons.js2 function f1<T, K1 extends keyof T, K2 extends keyof T[K1]>() {
4 let v2: Extract<T[K1], string> = 0 as any as T[K1]; // Error
5 let v3: Extract<T[K1][K2], string> = 0 as any as T[K1][K2]; // No error
/third_party/typescript/tests/cases/compiler/
DdeepKeysIndexing.ts10 K1 extends keyof O
11 > = O[K1] extends object ? Extract<keyof O[K1], string> : never;
15 K1 extends keyof O
16 > = O[K1] extends object ? keyof O[K1] : never;
18 type keys2workaround<O extends DeepObject, K1 extends keyof O> = Extract<
19 O[K1] extends object ? keyof O[K1] : never,
33 K1 extends keyof O,
34 K2 extends keys2broken<O, K1>,
35 V extends O[K1][K2]
36 >(k1: K1, k2: K2, value: V) {}
[all …]
DtwiceNestedKeyofIndexInference.ts1 type Set1<T, K1 extends keyof T> = T extends any[] ? T : Pick<T, Exclude<keyof T, K1>> & {
2 [SK1 in K1]-?: Required<Pick<T, SK1>>;
3 }[K1];
5 type Set2<T, K1 extends keyof T, K2 extends keyof T[K1]> = T extends any[] ? T : Pick<T, Exclude<ke…
6 [SK1 in K1]-?: Required<{
7 [key in K1]: Set1<T[K1], K2>;
9 }[K1];
11 declare function set<T, K1 extends keyof T>(source: T, path: [K1], value: T[K1]): Set1<T, K1>;
13 declare function set<T, K1 extends keyof T, K2 extends keyof T[K1]>(source: T, path: [K1, K2], valu…
Dqualify.ts35 export module K1 {
45 var v2:K1.I3=v1;
46 var v3:K1.I3[]=v1;
47 var v4:()=>K1.I3=v1;
48 var v5:(k:K1.I3)=>void=v1;
49 var v6:{k:K1.I3;}=v1;
DdeepComparisons.ts1 function f1<T, K1 extends keyof T, K2 extends keyof T[K1]>() {
3 let v2: Extract<T[K1], string> = 0 as any as T[K1]; // Error
4 let v3: Extract<T[K1][K2], string> = 0 as any as T[K1][K2]; // No error
/third_party/ltp/testcases/kernel/syscalls/pread/
Dpread01.c22 #define K1 1024 macro
23 #define K2 (K1 * 2)
24 #define K3 (K1 * 3)
25 #define K4 (K1 * 4)
49 if (memcmp(write_buf[count], read_buf[count], K1) != 0) { in compare_bufers()
61 SAFE_PREAD(1, fildes, read_buf[2], K1, K2); in verify_pread()
65 SAFE_PREAD(1, fildes, read_buf[3], K1, K3); in verify_pread()
68 SAFE_READ(1, fildes, read_buf[0], K1); in verify_pread()
69 l_seek(fildes, 0, SEEK_CUR, K1); in verify_pread()
71 SAFE_PREAD(1, fildes, read_buf[1], K1, K1); in verify_pread()
[all …]
/third_party/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite01.c23 #define K1 1024 macro
24 #define K2 (K1 * 2)
25 #define K3 (K1 * 3)
26 #define K4 (K1 * 4)
49 l_seek(fildes, count * K1, SEEK_SET, count * K1); in check_file_contents()
51 SAFE_READ(1, fildes, read_buf[count], K1); in check_file_contents()
53 if (memcmp(write_buf[count], read_buf[count], K1) != 0) { in check_file_contents()
65 SAFE_PWRITE(1, fildes, write_buf[0], K1, 0); in verify_pwrite()
67 l_seek(fildes, K1 / 2, SEEK_SET, K1 / 2); in verify_pwrite()
69 SAFE_PWRITE(1, fildes, write_buf[2], K1, K2); in verify_pwrite()
[all …]
Dpwrite04.c25 #define K1 1024 macro
26 #define K2 (K1 * 2)
27 #define K3 (K1 * 3)
58 l_seek(fd, K1, SEEK_SET, K1); in verify_pwrite()
59 SAFE_PWRITE(1, fd, write_buf[1], K1, 0); in verify_pwrite()
60 l_seek(fd, 0, SEEK_CUR, K1); in verify_pwrite()
73 write_buf[1] = SAFE_MALLOC(K1); in setup()
74 memset(write_buf[0], 1, K1); in setup()
/third_party/ltp/testcases/kernel/syscalls/write/
Dwrite06.c27 #define K1 1024 macro
28 #define K2 (K1 * 2)
29 #define K3 (K1 * 3)
49 off = SAFE_LSEEK(fd, K1, SEEK_SET); in verify_write()
50 if (off != K1) in verify_write()
53 SAFE_WRITE(1, fd, write_buf[1], K1); in verify_write()
73 memset(write_buf[1], 1, K1); in setup()
91 {&write_buf[1], .size = K1},

123456