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

Type Error: firebase-app.ts #604

Open
Alonski opened this issue Mar 14, 2020 · 2 comments
Open

Type Error: firebase-app.ts #604

Alonski opened this issue Mar 14, 2020 · 2 comments

Comments

@Alonski
Copy link

Alonski commented Mar 14, 2020

Version info

e.g.
DEBUG: -------------------------------
DEBUG: Ember      : 3.16.0
DEBUG: Ember Data : 3.17.0
DEBUG: Firebase   : 7.7.0
DEBUG: EmberFire  : 3.0.0-rc.6
DEBUG: jQuery     : 0
DEBUG: -------------------------------

Test case

Steps to reproduce

  1. Install this addon in a new Ember Octane + Typescript app.
  2. Run Ember Serve/Builder and receive an error.

Expected behavior

No type error is thrown.

Actual behavior

This type error is thrown:

../../node_modules/emberfire/services/firebase-app.d.ts:14:5 - error TS2416: Property 'name' in type 'FirebaseAppService' is not assignable to the same property in base type '{ name: undefined; firebase: ComputedProperty<FirebaseService, FirebaseService>; } & Service & { name: undefined; firebase: ComputedProperty<...>; }'.
  Type 'string | undefined' is not assignable to type 'undefined'.
    Type 'string' is not assignable to type 'undefined'.

14     name?: string;
@Alonski
Copy link
Author

Alonski commented Mar 18, 2020

@jamesdaniels Any ideas :)

@Alonski
Copy link
Author

Alonski commented Mar 18, 2020

Would this fix things?

declare const FirebaseAppService_base: Readonly<typeof Service> & (new (properties?: object | undefined) => {
    name?: string;
    firebase: import("@ember/object/computed").default<FirebaseService, FirebaseService>;
} & Service) & (new (...args: any[]) => {
    name?: string;
    firebase: import("@ember/object/computed").default<FirebaseService, FirebaseService>;
} & Service);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant