Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

TypeScript compile error in Deno 1.6 #13

Open
Mabi19 opened this issue Dec 16, 2020 · 0 comments
Open

TypeScript compile error in Deno 1.6 #13

Mabi19 opened this issue Dec 16, 2020 · 0 comments

Comments

@Mabi19
Copy link

Mabi19 commented Dec 16, 2020

Importing the package errors in Deno 1.6.
Output of deno --version:

deno 1.6.0 (release, x86_64-pc-windows-msvc)
v8 8.8.278.2
typescript 4.1.2

And here is the error message:

error: TS2322 [ERROR]: Type '(value: T | PromiseLike<T>) => void' is not assignable to type 'Resolve<T>'.
  Types of parameters 'value' and 'value' are incompatible.
    Type 'T | PromiseLike<T> | undefined' is not assignable to type 'T | PromiseLike<T>'.
      Type 'undefined' is not assignable to type 'T | PromiseLike<T>'.
            methods = { resolve, reject }
                        ~~~~~~~
    at https://deno.land/x/pgc4d@v1.3.6/src/utils.ts:21:25

    The expected type comes from property 'resolve' which is declared here on type '{ resolve: Resolve<T>; reject: Reject; }'
            let methods: { resolve: Resolve<T>, reject: Reject }
                           ~~~~~~~
        at https://deno.land/x/pgc4d@v1.3.6/src/utils.ts:19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant