Комментарии:
Would you be able to use angled brackets so you could keep your "export function etc" style of declaring your function?
Like `export function sortJSON<SortFunction>(text: string): SortSuccess | SortError {`
what extention do you use to auto import types? I have auto import but it doesnt add it as a type.
ОтветитьHey Benny, great video as usual. I think you can export that function type in one line by doing: export type SortFunction = (input: string) => SortSucess | SortError
Ответить