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 invalid character error #130

Closed
wangyangjun opened this issue Oct 15, 2020 · 1 comment
Closed

Typescript invalid character error #130

wangyangjun opened this issue Oct 15, 2020 · 1 comment

Comments

@wangyangjun
Copy link

wangyangjun commented Oct 15, 2020

Invalid character. TS1127

    3 | import { OnDidChangeCallback, Options, Unsubscribe, Schema, OnDidAnyChangeCallback } from './types';
    4 | declare class Conf<T extends Record<string, any> = Record<string, unknown>> implements Iterable<[keyof T, T[keyof T]]> {
  > 5 |     #private;
      |     ^
    6 |     readonly path: string;
    7 |     readonly events: EventEmitter;
    8 |     constructor(partialOptions?: Readonly<Partial<Options<T>>>);
@wangyangjun
Copy link
Author

For anyone see this issue also, I got this error in a project created by react-create-app. It is because the version of typescript is ~3.7.2, but private field # was introduced after 3.8.0. Just upgrade typescript version, it should be fixed.

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