-
Notifications
You must be signed in to change notification settings - Fork 58
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
fix(types): make definitions nodenext compatible #198 #199
base: master
Are you sure you want to change the base?
fix(types): make definitions nodenext compatible #198 #199
Conversation
test command: tsc types/FluentJSONSchema.test-d.ts --module 'nodenext'
|
Pull Request Test Coverage Report for Build 3341861259
💛 - Coveralls |
Pull Request Test Coverage Report for Build 3341861259
💛 - Coveralls |
Pull Request Test Coverage Report for Build 3341861259Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@climba03003 |
Can you provide a repo which i can clone? |
https://github.com/cesarvspr/issue-reproduction don't forget to replace the type definition inside node modules to have this branch implementation |
Any update about this PR? May I help with something to speed-up those changes? |
It would be great to test it, it's unclear if it's really fix the root issue |
I'm writing a "test all the possible TypeScript craziness" project to test any combination between:
I hope to have some results soon. It will be published on my GitHub. |
@greguz Maybe something like helmetjs/helmet#391 |
Something like what i did for helmet should be easily implemented. |
I'm not entirely sure how to write TS tests with multiple tsconfig.json, package.json, different import styles, etc (and I'm also not sure if It can be useful). Just to be sure (because with TypeScript anything is possible), I've created a project that transpiles, tests, and execute some scripts against this project. I added the patch contained inside this PR, but inside the reports dir I see some unexpected errors. Like this one. |
The types update specified in this PR are not compatible with NodeNext/Node16 modules after the TypeScript 1.8 "patch". This is because of how the This file passed almost any configured environment combination. The main difference is the removal of |
@climba03003 |
I used the two types of import described inside the docs: import S from 'fluent-json-schema' and import * as S from 'fluent-json-schema' Other ways of import (like |
I've missed some exports, and sadly I've found more than one problem with some reserved keywords: export declare const null: S['null']
export declare const enum: S['enum']
export declare const const: S['const']
export declare const default: S['default'] Those exports throws an error because the usage of some reserved keyword. All other exports are ok. I start to think that the only way to fix this issue entirely with Node16/NodeNext modules is to add/migrate to |
@cesarvspr mind resolving the conflicts please? |
This PR got kind of overridden by #207. @greguz was very effective in proposing his solution, despite we had the "template" of @climba03003 and are using it in this PR. Basically resolving the merge conflicts is the same as reverting the solution in #207. So the question is: What is the preferred solution? |
You can always map the |
You can have only one export, when we want to use |
Nope, you can export inside the |
Do you have some explicit change requests? |
No, currently. I see the |
Checklist
npm run test
andnpm run benchmark
and the Code of conduct