Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Typings not working after V8.0.0 #4303

Closed
glumb opened this issue Jan 17, 2021 · 5 comments
Closed

Typescript Typings not working after V8.0.0 #4303

glumb opened this issue Jan 17, 2021 · 5 comments

Comments

@glumb
Copy link

glumb commented Jan 17, 2021

Describe your environment

  • Firebase SDK version: 8.2.3
  • Firebase Product: js SDK TS Typings
  • Typescript: 4.1.3

Describe the problem

firebase/index.d.ts has ts errors and thus the Typings can not be used in the project. Specifically line 7851 "Identifier expected. 'default' is a reserved word that cannot be used here.ts(1359)" Thus I can not use the typings for e.g. firebase.default.firestore.FieldValue since default is not recognised as a valid key.

import firebase from 'firebase/app'
import 'firebase/firestore'

export const increment = firebase.firestore.FieldValue.increment // error Namespace 'firebase' has no exported member 'firestore'.
export const FieldValue = firebase.default.firestore.FieldValue // error Namespace 'firebase' has no exported member 'default'.
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@maccman
Copy link

maccman commented Jan 28, 2021

This needs fixing pretty urgently.

@hsubox76
Copy link
Contributor

hsubox76 commented Feb 2, 2021

We tried to reproduce this and weren't able to. I made a fresh Webpack/TS project from scratch using TS 4.1.3, Firebase 8.2.3, and ts-loader. The index.ts only contains:

import firebase from 'firebase/app';
import 'firebase/firestore';

firebase.initializeApp({...});

console.log(firebase.firestore.FieldValue.increment);

and there are no errors. Can you upload a minimal repro to github with just a minimal index.ts and your build config, package.json, everything needed to build and reproduce this error?

@google-oss-bot
Copy link
Contributor

Hey @glumb. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@glumb if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants