|
| 1 | +=== /tests/cases/fourslash/completionDetailsOfContextSensitiveParameterNoCrash.ts === |
| 2 | +// type __ = never; |
| 3 | +// |
| 4 | +// interface CurriedFunction1<T1, R> { |
| 5 | +// (): CurriedFunction1<T1, R>; |
| 6 | +// (t1: T1): R; |
| 7 | +// } |
| 8 | +// interface CurriedFunction2<T1, T2, R> { |
| 9 | +// (): CurriedFunction2<T1, T2, R>; |
| 10 | +// (t1: T1): CurriedFunction1<T2, R>; |
| 11 | +// (t1: __, t2: T2): CurriedFunction1<T1, R>; |
| 12 | +// (t1: T1, t2: T2): R; |
| 13 | +// } |
| 14 | +// |
| 15 | +// interface CurriedFunction3<T1, T2, T3, R> { |
| 16 | +// (): CurriedFunction3<T1, T2, T3, R>; |
| 17 | +// (t1: T1): CurriedFunction2<T2, T3, R>; |
| 18 | +// (t1: __, t2: T2): CurriedFunction2<T1, T3, R>; |
| 19 | +// (t1: T1, t2: T2): CurriedFunction1<T3, R>; |
| 20 | +// (t1: __, t2: __, t3: T3): CurriedFunction2<T1, T2, R>; |
| 21 | +// (t1: T1, t2: __, t3: T3): CurriedFunction1<T2, R>; |
| 22 | +// (t1: __, t2: T2, t3: T3): CurriedFunction1<T1, R>; |
| 23 | +// (t1: T1, t2: T2, t3: T3): R; |
| 24 | +// } |
| 25 | +// |
| 26 | +// interface CurriedFunction4<T1, T2, T3, T4, R> { |
| 27 | +// (): CurriedFunction4<T1, T2, T3, T4, R>; |
| 28 | +// (t1: T1): CurriedFunction3<T2, T3, T4, R>; |
| 29 | +// (t1: __, t2: T2): CurriedFunction3<T1, T3, T4, R>; |
| 30 | +// (t1: T1, t2: T2): CurriedFunction2<T3, T4, R>; |
| 31 | +// (t1: __, t2: __, t3: T3): CurriedFunction3<T1, T2, T4, R>; |
| 32 | +// (t1: __, t2: __, t3: T3): CurriedFunction2<T2, T4, R>; |
| 33 | +// (t1: __, t2: T2, t3: T3): CurriedFunction2<T1, T4, R>; |
| 34 | +// (t1: T1, t2: T2, t3: T3): CurriedFunction1<T4, R>; |
| 35 | +// (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3<T1, T2, T3, R>; |
| 36 | +// (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2<T2, T3, R>; |
| 37 | +// (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2<T1, T3, R>; |
| 38 | +// (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2<T1, T2, R>; |
| 39 | +// (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1<T3, R>; |
| 40 | +// (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1<T2, R>; |
| 41 | +// (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1<T1, R>; |
| 42 | +// (t1: T1, t2: T2, t3: T3, t4: T4): R; |
| 43 | +// } |
| 44 | +// |
| 45 | +// declare var curry: { |
| 46 | +// <T1, R>(func: (t1: T1) => R, arity?: number): CurriedFunction1<T1, R>; |
| 47 | +// <T1, T2, R>(func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2<T1, T2, R>; |
| 48 | +// <T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3<T1, T2, T3, R>; |
| 49 | +// <T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4<T1, T2, T3, T4, R>; |
| 50 | +// (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; |
| 51 | +// placeholder: __; |
| 52 | +// }; |
| 53 | +// |
| 54 | +// export type StylingFunction = ( |
| 55 | +// keys: (string | false | undefined) | (string | false | undefined)[], |
| 56 | +// ...rest: unknown[] |
| 57 | +// ) => object; |
| 58 | +// |
| 59 | +// declare const getStylingByKeys: ( |
| 60 | +// mergedStyling: object, |
| 61 | +// keys: (string | false | undefined) | (string | false | undefined)[], |
| 62 | +// ...args: unknown[] |
| 63 | +// ) => object; |
| 64 | +// |
| 65 | +// declare var mergedStyling: object; |
| 66 | +// |
| 67 | +// export const createStyling: CurriedFunction3< |
| 68 | +// (base16Theme: object) => unknown, |
| 69 | +// object | undefined, |
| 70 | +// object | undefined, |
| 71 | +// StylingFunction |
| 72 | +// > = curry< |
| 73 | +// (base16Theme: object) => unknown, |
| 74 | +// object | undefined, |
| 75 | +// object | undefined, |
| 76 | +// StylingFunction |
| 77 | +// >( |
| 78 | +// ( |
| 79 | +// getStylingFromBase16: (base16Theme: object) => unknown, |
| 80 | +// options: object = {}, |
| 81 | +// themeOrStyling: object = {}, |
| 82 | +// ...args |
| 83 | +// ): StylingFunction => { |
| 84 | +// return curry(getStylingByKeys, 2)(mergedStyling, ...args); |
| 85 | +// ^^^^ |
| 86 | +// | ---------------------------------------------------------------------- |
| 87 | +// | (parameter) args: any |
| 88 | +// | ---------------------------------------------------------------------- |
| 89 | +// }, |
| 90 | +// 3 |
| 91 | +// ); |
| 92 | + |
1 | 93 | [
|
2 | 94 | {
|
3 | 95 | "marker": {
|
4 | 96 | "fileName": "/tests/cases/fourslash/completionDetailsOfContextSensitiveParameterNoCrash.ts",
|
5 | 97 | "position": 3101,
|
6 | 98 | "name": ""
|
7 | 99 | },
|
8 |
| - "quickInfo": { |
| 100 | + "item": { |
9 | 101 | "kind": "parameter",
|
10 | 102 | "kindModifiers": "",
|
11 | 103 | "textSpan": {
|
|
0 commit comments