-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(rest): use direct import to work around a TS bug #1689
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
Conversation
@raymondfeng , the current I noticed that the package.json for CLI under templateDependencies is correct Is that the reason why we are experiencing this effect ? |
I see this PR fixes the other issue with |
I suspect that one of the publish failed half way and left the versions inconsistent |
packages/rest/src/keys.ts
Outdated
* See https://github.com/Microsoft/TypeScript/issues/26985 | ||
*/ | ||
// import {OpenApiSpec} from '@loopback/openapi-v3-types'; | ||
import {OpenAPIObject} from 'openapi3-ts'; |
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.
Can you please rename OpenAPIObject
to OpenApiSpec
to avoid changing the places using this type below? We don't want to rename them from OpenApiSpec
to OpenAPIObject
now and then rename them back to OpenApiSpec
when the typescript bug is fixed.
import {OpenAPIObject as OpenApiSpec} from 'openapi3-ts';
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.
Good idea.
dfab96d
to
a77970c
Compare
a77970c
to
95cf976
Compare
@bajtos PTAL |
/** | ||
* See https://github.com/Microsoft/TypeScript/issues/26985 | ||
*/ | ||
// import {OpenApiSpec} from '@loopback/openapi-v3-types'; |
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.
can we remove this import statement?
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 intentionally kept it here so that we don't forget to revert it once the TS issue is fixed.
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.
See microsoft/TypeScript#26985
Work around #1688 (comment)
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated