-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Preview: Handle new docs-page index entries #18595
Preview: Handle new docs-page index entries #18595
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 79e5367. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
379b85b
to
75b818a
Compare
95919b8
to
05b184a
Compare
3396d2b
to
ea331bf
Compare
a682561
to
62153f3
Compare
2d21f9b
to
6cfdf34
Compare
@shilman As you predicted the What should I do with that for now? I'll disable the whole circle task, but if you think something different, let me know. |
62153f3
to
70737e2
Compare
68ea524
to
d68956b
Compare
@ndelangen why did you make this a draft? |
70737e2
to
095a5a9
Compare
36dae59
to
e19e16c
Compare
@@ -46,6 +47,16 @@ function focusInInput(event: Event) { | |||
} | |||
|
|||
type MaybePromise<T> = Promise<T> | T; | |||
type PossibleRender<TFramework extends AnyFramework> = |
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.
Why is this PossibleRender
and not just Render
? PossibleRender
sounds like there may or may not actually be a render...
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.
Render
is the name of the interface. I could change that to BaseRender
?
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.
IRender
? BaseRender
sounds like it's providing some base functionality but it's just an interface. I wonder what's idiomatic TypeScript for this? I'm very familiar with this pattern from my OO days, but I haven't seen the analog to PossibleRender
there.
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 can't really remember what it was like to code in an OO language but I think TS does stuff with type "elimination" that I don't recall from those days. Like if you have const x: A | B
and then put if (x not of type A)
in your code (that's pseudo code) TS will automatically cast it to B
which is super handy.
Whereas if you have const x: I
where I
is an interface that A
and B
implement, it can't know that x
isn't so other theoretical implementer, even if none exist.
Telescoping on #18574
Handle new docs entries types in the preview. In particular:
storyImports
also), to account for multiple files that define stories for the same component.