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

Add support for TypeScript 3.8 #1134

Merged
merged 3 commits into from
Feb 28, 2020
Merged

Add support for TypeScript 3.8 #1134

merged 3 commits into from
Feb 28, 2020

Conversation

rrdelaney
Copy link
Contributor

@rrdelaney rrdelaney commented Feb 27, 2020

This upgrades the version of TypeScript Tsickle uses as a devDependency and a peerDependency, which in turn upgrades the tslib version.

Support for Private Fields

Tsickle mostly ignores private fields, however it no longer warns when not generating externs for them. Externs are not generated because the fields no not exist on the class when downleveled.

Support for export * as ns Syntax

Tsickle compiles:

export * as ns from './namespace';

to

var tsickle_module_1_ = goog.require('project.namespace');
exports.ns = tsickle_module_1_;

New tslib Functions

Private fields require two new functions in tslib: __classPrivateFieldGet and __classPrivateFieldSet. Both of these were added to Tsickle's version of tslib.js along with Closure type annotations.

Other Changes

  • The import_export_typedef_conflict test was removed because that code is no longer valid in TypeScript 3.8, and produces a compile error.
  • tslib@1.11.0 was added as a devDependency. Before it was being pulled in as a transitive dependency, but the packages pulling it in depend on 1.10. To upgrade to TypeScript 3.8 Tsickle needs the latest version of tslib.

src/jsdoc_transformer.ts Outdated Show resolved Hide resolved
test/googmodule_test.ts Outdated Show resolved Hide resolved
@mprobst
Copy link
Contributor

mprobst commented Feb 27, 2020

Nice!

This upgrades the version of TypeScript Tsickle uses as a
`devDependency` and a `peerDependency`.

Support for Private Fields
--------------------------
Tsickle mostly ignores private fields, however it no longer warns when
not generating externs for them. Externs are not generated because the
fields no not exist on the class when downleveled.

Support for `export * as ns` Syntax
-----------------------------------
Tsickle compiles:

```ts
export * as ns from './namespace';
```

to

```ts
var tsickle_module_1_ = goog.require('project.namespace');
exports.ns = tsickle_module_1_;
```

New `tslib` Functions
---------------------
Private fields require two new functions in `tslib`:
`__classPrivateFieldGet` and `__classPrivateFieldSet`. Both of these
were added to Tsickle's version of `tslib.js` along with Closure type
annotations.

Other Changes
-------------
* The `import_export_typedef_conflict` test was removed because that
  code is no longer valid in TypeScript 3.8, and produces a compile
  error.
* `tslib@1.11.0` was added as a `devDependency`. Before it was being
  pulled in as a transitive dependency, but the packages pulling it in
  depend on `1.10`. To upgrade to TypeScript 3.8 Tsickle needs the latest
  version of `tslib`.
@rrdelaney rrdelaney merged commit f4ae5f8 into angular:master Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants