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
WIP: [ts-migration] lib/core #9870
Conversation
8132b25
to
e14292c
Compare
@@ -1,9 +1,9 @@ | |||
export default class Provider { | |||
getElements() { | |||
getElements(type: string) { |
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.
fyi @ndelangen I had to modify the signature of getElements
and handleAPI
because every class that has extended this base class had these arguments implemented
I hope that's ok?
I found this in export const getContext = (() => {
let cache;
return decorateStory => {
if (cache) {
return cache;
} I think this is dead code; cache appears three times and is never passed to any method / function. @ndelangen am I right? |
there is an undefined check so it is allowed to be undefined
@kroeder It can likely be replaced with a memoize |
@kroeder - I am about to do a big of refactor of the preview files in core ( I'll be typescript-ing the files I touch, hopefully I'll be done soon; perhaps in the meantime it'd be best to hold fire on those particular files in this PR? I'll bring across what you've done so far as a starting point. |
@tmeasday what do I need to do to solve the conflicting files? |
@kroeder that sounds about right, yeah. |
# Conflicts: # lib/client-api/src/story_store.ts # lib/core/src/client/preview/start.tsx # lib/core/src/client/preview/types.ts # lib/core/src/client/preview/url.ts
Closing this one in favor of #12839 + another one coming soon to refine the types. |
Issue: #5030