You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// tsconfig.json (in "foo" and "bar" modules){"compilerOptions": {"target": "ES2018","noImplicitAny": true,"declaration": true}}
// In module "foo", "index.ts"exportclassFoo{readonly #bar: string='baz';publicgetbar(){returnthis.#bar;}}
// in module "bar", "index.ts"import{Foo}from'foo';newFoo();
Expected behavior:
I can declare private fields in classes exported by one package/module, and consume that from another package/module without issues.
Actual behavior:
The module that contains the private fields yields a #private declaration that triggers the noImplicitAny error when it's imported from the other module:
// "index.d.ts" in module "foo"exportdeclareclassFoo{
#private;// ~~~~~~~~ error TSC7008: Member '#private' implicitly has an 'any' typegetbar(): string;}
Related Issues: Similar to #6415, except with private-named fields.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 3.8.0-dev.20200205
Search Terms:
Code
Expected behavior:
I can declare private fields in classes exported by one package/module, and consume that from another package/module without issues.
Actual behavior:
The module that contains the private fields yields a
#private
declaration that triggers thenoImplicitAny
error when it's imported from the other module:Related Issues: Similar to #6415, except with private-named fields.
The text was updated successfully, but these errors were encountered: