Hi @phpstorm, you introduced the .phpstorm.meta.php feature some time ago. Is there also something similar for typescript / javascript available?
Hi Nico, can you please explain a bit more the use case? For TypeScript and JavaScript code, we reply on the JSDoc comments and TypeScript type definition files for code completion. In Angular apps we also use the Angular metadata json files.
-
-
Lets say i have a list of ABC-Objects. I want to filter them in the template > "abc | myFilterPipe". The myFilterPipe can work with any type of object list. So the return type of myFilterPipe would be object[]. Now it is not possible to check if a property of the object exists.
-
It seems that the best approach here would be to use TypeScript generic parameters to describe that object - that way there will be a single source of truth both for the IDE and TypeScript.
- 1 more reply
New conversation -
-
-
<div *ngFor="let test of tests | myFilterPipe: { group: 'Test' }"> {{ test.myProperty }} <!-- not possible to check if property exists because of return type object[] --> </div>
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.