5 ms·
index.d.ts: type FooArgs = {x: string} type FooResult = {y: string} type Foo = (_: FooArgs) => FooResult index.js: /// <reference path="index
by lacampbell 7y ago
index.d.ts:
type FooArgs = {x: string}
type FooResult = {y: string}
type Foo = (_: FooArgs) => FooResult
index.js:
/// <reference path="index.d.ts"/>
/** @type {Foo} */
export const foo = ({x}) => ({y: x})
Works as well
- deleted 7y ago[deleted]
- lhorie 7y agoGood point!