mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
better types that work
`ImporterReturnType` is a union of all the possible return values. The function signature works for both sync and async varieties, and in truth both can be used at the same time (I've tried it) so this is great.
This commit is contained in:
3
node-sass/index.d.ts
vendored
3
node-sass/index.d.ts
vendored
@@ -8,8 +8,7 @@
|
||||
type ImporterReturnType = { file: string } | { contents: string } | Error | null;
|
||||
|
||||
interface Importer {
|
||||
(url: string, prev: string): ImporterReturnType;
|
||||
(url: string, prev: string, done: (data: ImporterReturnType) => void): void;
|
||||
(url: string, prev: string, done: (data: ImporterReturnType) => void): ImporterReturnType | void;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
|
||||
Reference in New Issue
Block a user