ts-interface-builder
ts-interface-builder copied to clipboard
--ignore-not-supported, GenericRecords to object, resolve namespaces
Do not throw exception on non supported features. GenericRecords transforms to object Namespaces content are parsed
@Crusader4Christ It seems the new test ("should compile namespace to runtime code") is also responsible for testing --ignore-not-supported
. I think that --ignore-not-supported
should have it's own test, like all the other flags. Also there's no updates regarding the new "GenericRecords
to object feature". I think (if I can guess what it is) it can just be an addition to the sample.ts
& sample-ti.ts
fixtures.
So looking at the test you added, I can see how the "resolve namespaces" feature has been implemented. I guess this lets us use ts-interface-builder/checker with types that are in namespaces, in basic scenarios, but what about:
- Types that depend on namespaced types. e.g.
type IMyFoo: MyNamespace.IFoo | null
.. will that work? (not sure) - Types that have the same name as a namespaced type. Can I compile & use a type suite with
IThing
,MyNamespace.IThing
&MyOtherNamespace.IThing
? (with this implementation, no)
Just trying to look at this holistically, in terms of support for namespaces in general. Maybe this is a good stepping stone & these issues can be left for later, since I guess it would be a bit of work between this lib & ts-interface-checker.