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

feat: downlevel .d.ts for older TS versions #320

Merged
merged 1 commit into from
Jun 23, 2020
Merged

feat: downlevel .d.ts for older TS versions #320

merged 1 commit into from
Jun 23, 2020

Conversation

L2jLiga
Copy link
Contributor

@L2jLiga L2jLiga commented Jun 23, 2020

allows to use spectator 5.x with Angular 8 with TS 3.5

Signed-off-by: Andrey Chalkin L2jLiga@gmail.com

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Angular 8 with TS 3.5 tests fails due to TS errors like

node_modules/@ngneat/spectator/lib/spectator/spectator.d.ts:15:9 - error TS1086: An accessor cannot be declared in an ambient context.

15    get component(): C;

Issue Number: #285

What is the new behavior?

.d.ts are downleveled to build without any errors

get component(): C; -> readonly component: C; (accessors were added in TS 3.6)

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

allows to use spectator 5.x with Angular 8 with TS 3.5

Signed-off-by: Andrey Chalkin <L2jLiga@gmail.com>
@NetanelBasal
Copy link
Member

NetanelBasal commented Jun 23, 2020

It should also close #285, right?

And did you test that this works?

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Jun 23, 2020

Right, I tested on my quite huge Angular 8 project with TS 3.5

@NetanelBasal NetanelBasal merged commit acb0eca into ngneat:master Jun 23, 2020
@L2jLiga L2jLiga deleted the feature/downlevel-dts branch June 23, 2020 04:23
@NetanelBasal
Copy link
Member

Thanks

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

Successfully merging this pull request may close these issues.

None yet

2 participants