Right now you can say a string which will accept any string literal("abc") or the string type itself. There is many cases where you'd actually want it to only be allowed to receive a value(string literal in this case).
Maybe we can have something like
model Foo<T extends string & value> {}
// or
model Foo<T extends valueof(string)>
Proposal https://gist.github.com/timotheeguerin/56214ebb131722a9c88a8bdb74a112b1
Right now you can say a
stringwhich will accept any string literal("abc") or thestringtype itself. There is many cases where you'd actually want it to only be allowed to receive a value(string literal in this case).Maybe we can have something like
Proposal https://gist.github.com/timotheeguerin/56214ebb131722a9c88a8bdb74a112b1