We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type Constructor<T> = new (...args: any[]) => T; export const Timestamped = <CT extends Constructor<object>>(Base: CT) => { return class extends Base { timestamp = new Date(); }; }
Expected: It just works Actual: It doesn't work - I get an error on Base in the extends clause stating that object is not a class or interface type.
Base
object
This makes little sense given that this is a better restriction than {}.
{}
The text was updated successfully, but these errors were encountered:
@ahejlsberg can you merge this into release-2.2?
release-2.2
Sorry, something went wrong.
@DanielRosenwasser Can you get @mhegazy or someone else to do it?
it is already merged.
ahejlsberg
No branches or pull requests
Expected: It just works
Actual: It doesn't work - I get an error on
Base
in the extends clause stating thatobject
is not a class or interface type.This makes little sense given that this is a better restriction than
{}
.The text was updated successfully, but these errors were encountered: