|
| 1 | + interface Foobar { |
| 2 | +// definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/ |
| 3 | +//documentation ```ts\nmodule "object-literals-arrow-function.ts"\n``` |
| 4 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 5 | +// documentation ```ts\ninterface Foobar\n``` |
| 6 | + foobar: number |
| 7 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 8 | +// documentation ```ts\n(property) foobar: number\n``` |
| 9 | + } |
| 10 | + |
| 11 | + export interface Option<A> { |
| 12 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option# |
| 13 | +// documentation ```ts\ninterface Option\n``` |
| 14 | +// ^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option#[A] |
| 15 | +// documentation ```ts\nA: A\n``` |
| 16 | + value?: A |
| 17 | +// ^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option#value. |
| 18 | +// documentation ```ts\n(property) value: A\n``` |
| 19 | +// ^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option#[A] |
| 20 | + } |
| 21 | + |
| 22 | + export function hasArrowFunctionParameter( |
| 23 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter(). |
| 24 | +// documentation ```ts\nfunction hasArrowFunctionParameter(something: number, fn: (foobar: Foobar) => Foobar): Foobar\n``` |
| 25 | + something: number, |
| 26 | +// ^^^^^^^^^ definition local 0 |
| 27 | +// documentation ```ts\n(parameter) something: number\n``` |
| 28 | + fn: (foobar: Foobar) => Foobar |
| 29 | +// ^^ definition local 1 |
| 30 | +// documentation ```ts\n(parameter) fn: (foobar: Foobar) => Foobar\n``` |
| 31 | +// ^^^^^^ definition local 2 |
| 32 | +// documentation ```ts\n(parameter) foobar: Foobar\n``` |
| 33 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 34 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 35 | + ): Foobar { |
| 36 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 37 | + return fn({ foobar: 42 + something }) |
| 38 | +// ^^ reference local 1 |
| 39 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 40 | +// ^^^^^^^^^ reference local 0 |
| 41 | + } |
| 42 | + export function consumesArrowFunction(): number { |
| 43 | +// ^^^^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/consumesArrowFunction(). |
| 44 | +// documentation ```ts\nfunction consumesArrowFunction(): number\n``` |
| 45 | + return ( |
| 46 | + hasArrowFunctionParameter(1, ({ foobar }) => ({ foobar: foobar + 1 })) |
| 47 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter(). |
| 48 | +// ^^^^^^ definition local 5 |
| 49 | +// documentation ```ts\n(parameter) foobar: number\n``` |
| 50 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 51 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 52 | +// ^^^^^^ reference local 5 |
| 53 | + .foobar + |
| 54 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 55 | + hasArrowFunctionParameter(2, foobar => ({ foobar: foobar.foobar + 2 })) |
| 56 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter(). |
| 57 | +// ^^^^^^ definition local 6 |
| 58 | +// documentation ```ts\n(parameter) foobar: Foobar\n``` |
| 59 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 60 | +// ^^^^^^ reference local 6 |
| 61 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 62 | + .foobar |
| 63 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar. |
| 64 | + ) |
| 65 | + } |
| 66 | + export function genericArrow(): Foobar[] { |
| 67 | +// ^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/genericArrow(). |
| 68 | +// documentation ```ts\nfunction genericArrow(): Foobar[]\n``` |
| 69 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 70 | + return [1].map<Foobar>(n => ({ foobar: n + 1 })) |
| 71 | +// ^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Array#map(). |
| 72 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 73 | +// ^ definition local 7 |
| 74 | +// documentation ```ts\n(parameter) n: number\n``` |
| 75 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar0: |
| 76 | +// documentation ```ts\n(property) foobar: number\n``` |
| 77 | +// ^ reference local 7 |
| 78 | + } |
| 79 | + export function genericArrowOption(): Option<Foobar>[] { |
| 80 | +// ^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/genericArrowOption(). |
| 81 | +// documentation ```ts\nfunction genericArrowOption(): Option<Foobar>[]\n``` |
| 82 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option# |
| 83 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 84 | + return [1].map<Option<Foobar>>(n => ({ value: { foobar: n + 1 } })) |
| 85 | +// ^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Array#map(). |
| 86 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Option# |
| 87 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 88 | +// ^ definition local 8 |
| 89 | +// documentation ```ts\n(parameter) n: number\n``` |
| 90 | +// ^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/value0: |
| 91 | +// documentation ```ts\n(property) value: { foobar: number; }\n``` |
| 92 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar1: |
| 93 | +// documentation ```ts\n(property) foobar: number\n``` |
| 94 | +// ^ reference local 8 |
| 95 | + } |
| 96 | + export function genericArrow2(): Foobar[] { |
| 97 | +// ^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/genericArrow2(). |
| 98 | +// documentation ```ts\nfunction genericArrow2(): Foobar[]\n``` |
| 99 | +// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar# |
| 100 | + return [1].map(n => ({ foobar: n + 1 })) |
| 101 | +// ^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Array#map(). |
| 102 | +// ^ definition local 9 |
| 103 | +// documentation ```ts\n(parameter) n: number\n``` |
| 104 | +// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar2: |
| 105 | +// documentation ```ts\n(property) foobar: number\n``` |
| 106 | +// ^ reference local 9 |
| 107 | + } |
| 108 | + |
0 commit comments