Metadata file and the Type::findType(): Type | undefined and Type::getTypes(): Array<Type> methods
See original GitHub issueSuggestion
Add optional behavior or change the default behavior which will generate metadata.js file which will contain all the information about types at one place.
- This should resolve the problem with circle dependencies,
- no duplicit type declarations in generated .js files,
- metadata can be used to find types eg. by name.
Example
const controllerType: Type = getType<Controller>();
const controllers = Type.getTypes().filter(type => type.isAssignableTo(controllerType));
Maybe something like @reflect() would be required to use on type declarations to optimize code. Or some configurations explicitly enabling metadata generation of all the types.
@reflect
export default class HomeController {}
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
PySpark ArrayType Column With Examples
PySpark pyspark.sql.types.ArrayType (ArrayType extends DataType class) is used to define an array data type column on DataFrame that holds the same type.
Read more >Type 'T[] | undefined' is not an array type · Issue #5767 - GitHub
Because characters can be undefined too, and undefined doesn't have a method called map the compiler is throwing an error.
Read more >Array<Type> VS Type[] in Typescript - Stack Overflow
Type [] is the shorthand syntax for an array of Type . Array<Type> is the generic syntax. They are completely equivalent.
Read more >ArrayType (Spark 2.4.4 JavaDoc) - Apache Spark
public class ArrayType extends DataType implements scala. ... static String, prettyJson() ... Methods inherited from class org.apache.spark.sql.types.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m so confused… it’s now working fine for me O.o
Okay I think my main problem is just related to ts-node and the logic for this include/exclude system I’m working on.
I think it’s just a case of it not visiting the files defined, since i tapped some hacky logic onto the mainVisitor…
For this idea to work, it might have to be a program transformer O.o (this would probably be better any way for the fact we’re generating files… when i did a similar thing with webpack(just manual file creation) it sent it into an endless re-compile loop, which i haven’t considered)