Skip to content

How do I type something that isn't already built in to the framework? #348

Answered by dfreeman
NullVoxPopuli asked this question in Q&A
Discussion options

You must be logged in to vote

So I guess assuming I'm using HelperLike correctly,

You're not 😉
The snippet I gave you with InstanceType was using it correctly, and linked to an example of that exact usage working in practice in @glint/ember-environment-ember-loose.

What version of TS are you using? InstanceType has accepted abstract constructors since this PR that landed in 4.3. Note that writing extends InstanceType<HelperLike<...>> in the playground you linked doesn't produce an error.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@NullVoxPopuli
Comment options

@NullVoxPopuli
Comment options

@NullVoxPopuli
Comment options

@NullVoxPopuli
Comment options

Answer selected by NullVoxPopuli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants