-
Notifications
You must be signed in to change notification settings - Fork 21
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 type declerations #24
Conversation
Changed jest module resolution to understand that `~` referes to `./src` Added `ttypescript` and `@zerollup/ts-transform-paths` to transform paths Changed `build:types` task to use `ttsc` with transform. fixes #/issues/23
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
- Coverage 86.92% 86.88% -0.04%
==========================================
Files 62 62
Lines 1086 1083 -3
Branches 188 188
==========================================
- Hits 944 941 -3
Misses 141 141
Partials 1 1
Continue to review full report at Codecov.
|
Hey, thanks a lot. While I'll propably agree anyway - but could you describe motivation behind this change a bit? Also, in many places you're using tabs instead of spaces in code formatting. Could you try to follow used convention? Thanks again |
Hey @pie6k, If you look at #23 the emitted definitions aren't usable when imported to another project. This is because of this issue. To fix that I added a transform to fix the emitted declarations and make them relative.. I described that build by adding the ttsconfig.json and changing the As for the path change, I used |
@pie6k I've sorted out the tabs to spaces issues. Anything else needed to get this pr merged in? |
I'll make sure everything works and try to merge it tomorrow ;) |
Thanks |
@andrew-w-ross hey, let me know if you'd be able to fix those tabs thing ;) |
@pie6k That should be all of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still tabs instead of spaces :)
compileInputObjectType, | ||
} from 'domains'; | ||
import { enumsRegistry, unionRegistry } from 'domains'; | ||
objectTypeRegistry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still tabs here instead of spaces - do you use prettier? :) I think I'll add it to auto-format project on every commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to put the blame completely on vscode here. Apparently when using regex namely \t
only checks the currently opened file or recently opened, I'm not entirely sure. Also tried prettier for a bit, wasn't bad.
return input; | ||
} | ||
if (isType(input)) { | ||
return input; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs again, I'll not comment every place with tabs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taaaaaabsss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that's all the tabs I could find.
return unionRegistry.get(input)(); | ||
} | ||
if (unionRegistry.has(input)) { | ||
return unionRegistry.get(input)(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pie6k I've just double checked using several other text editors and \t is not to be found. |
Added '~' path to refer to
./src
in tsconfigChanged jest module resolution to understand that
~
referes to./src
Added
ttypescript
and@zerollup/ts-transform-paths
to transform pathsChanged
build:types
task to usettsc
with transform.fixes prismake/typegql/issues/#23