Hi everyone! Did anyone manage to successfully get...
# javascript
e
Hi everyone! Did anyone manage to successfully get external type definitions for Firebase using ts2kt? I’m getting a partial output with several errors.
r
Hi Edouard, we have PR on review
<https://github.com/Kotlin/js-externals/pull/22>
which means some work is in progress. What kind of errors do you get? Probably we might help you with
e
Hi Roman, thanks for getting back and pointing me to the PR. I’m interested in the types defined in https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore-types/index.d.ts If I run ts2kt on the raw file, I get ts2kt: “ImportDeclaration” kind unsupported yet here! (firebase-firestore.d.ts11 to 17:70) When I manually add the types (from https://github.com/firebase/firebase-js-sdk/blob/master/packages/app-types/index.d.ts) instead of using the import, I get ts2kt: “TypeQuery” kind unsupported yet here! referring to line 101 in the original file: Promise: typeof Promise; Any idea?
r
It seems like there is some work has to be done for ts2kt. The possible workaround might be comment
typeof
expression and put the actual type manually.
e
just tried that, no more errors but the output file is missing a lot of types
r
What kind of types? Do they exist in the original d.ts files?
e
Yes, DocumentSnapshot for example