ts-interface-builder icon indicating copy to clipboard operation
ts-interface-builder copied to clipboard

--ignore-not-supported, GenericRecords to object, resolve namespaces

Open Crusader4Christ opened this issue 4 years ago • 1 comments

Do not throw exception on non supported features. GenericRecords transforms to object Namespaces content are parsed

Crusader4Christ avatar Sep 11 '20 13:09 Crusader4Christ

@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:

  1. Types that depend on namespaced types. e.g. type IMyFoo: MyNamespace.IFoo | null.. will that work? (not sure)
  2. 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.

zenflow avatar Sep 12 '20 12:09 zenflow