-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
More TS #19964
More TS #19964
Conversation
This will need to be cleaned up before merging. |
@@ -77,7 +81,7 @@ const VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; | |||
*/ | |||
export default class Registry implements IRegistry { | |||
readonly _failSet: Set<string>; | |||
resolver: Resolver | (Resolve & NotResolver) | null; | |||
resolver: Resolver | null; |
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.
This seems like it is probably incorrect.
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.
Noting how it works on line 64, are we sure it's not right? (It's certainly weird, and I don't know the runtime code here at all so I'll defer to you on the judgment call.)
resolver?: Resolver | (Resolve & NotResolver); |
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.
Probably deserves a more careful look at least!
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.
Couple small tweaks.
@@ -3144,7 +3144,7 @@ Clearly, `component-a` has subscribed to `some-other-component`'s `action`. Prev | |||
* CollectionView context is now its content | |||
* Various enhancements to bound helpers: adds multiple property support to bound helpers, adds bind-able options hash properties, adds {{unbound}} helper support to render unbound form of helpers. | |||
* Add App.inject | |||
* Add Ember.EnumberableUtils.intersection | |||
* Add Ember.EnumerableUtils.intersection |
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.
😂 Love it.
@@ -77,7 +81,7 @@ const VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; | |||
*/ | |||
export default class Registry implements IRegistry { | |||
readonly _failSet: Set<string>; | |||
resolver: Resolver | (Resolve & NotResolver) | null; | |||
resolver: Resolver | null; |
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.
Noting how it works on line 64, are we sure it's not right? (It's certainly weird, and I don't know the runtime code here at all so I'll defer to you on the judgment call.)
resolver?: Resolver | (Resolve & NotResolver); |
@public | ||
*/ | ||
resolver: null, | ||
declare resolver: Resolver; |
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.
Given it's set in the constructor, shouldn't need the declare
here.
declare resolver: Resolver; | |
resolver: Resolver; |
if (!reason) return; | ||
|
||
let withErrorThrown = reason as ReasonWithErrorThrown; | ||
if (withErrorThrown?.errorThrown) { |
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.
Optional chaining not needed here given the !reason
check on line 42.
if (withErrorThrown?.errorThrown) { | |
if (withErrorThrown.errorThrown) { |
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
interface ActionHandler {} | ||
declare const ActionHandler: Mixin; |
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.
Will presumably need a rebase now that #19948 has also updated this?
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.
Yes
import { Mixin } from '@ember/-internals/metal'; | ||
|
||
interface PromiseProxyMixin<T> { | ||
reason: null; |
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.
The default value is presumably null
but this would make it so you can't use anything but null
. From the docs, I think it should be unknown
?
reason: null; | |
reason: unknown; |
No description provided.