Joe Pea
Joe Pea
@soylomass Same answer for you too: decorators cannot modify the type of a `class` in TypeScript. See here: https://github.com/microsoft/TypeScript/issues/4881 and https://github.com/Microsoft/TypeScript/issues/4881#issuecomment-450938639 Of course this is all possible in plain JS,...
@ktsn Idea: the return type of a method can be used as the type of any other class property. Suppose the `Vue` base class defines a `composed: ReturnType` property (naming...
👍 I'd like to document decorators in some TypeScript usage examples soon, at which point I'll need to fix this.
This just bit me. I have the leafdoc directive character set to `@`, and I was trying to write a doc something like this: ```js /* @example `cat foo.txt |...
Thinking to add an escaping feature. I'm thinking of two options: - double up on the leafdoc character in places where it isn't meant to be used as a directive....
I think you're right! The double directive character seems like a better option.
That's a workaround only for TypeScript code (good thing for your case). No way around it in plain JS. Try in console: ```js class Foo { foo } const f...
That works, but it isn't desirable to write code that way.
> I'm only afraid that people might start using class field for declarative purposes without knowing that they implicitly initialize the property not knowing this will break code Exactly! I'm...
I've published code to production, and the issues that stem from this didn't become apparent until later. :exclamation: :exclamation: :exclamation: Testing would have caught the problem, but you all know...