Closed myalban closed 1 year ago
Hmm, the transformations goes through core-types and eventually into JSON Schema, OpenAPI or GraphQL, neither of which have namespaces.
What is the expected result here? To simply extract interfaces from the namespace and ignore the namespace in the output, or mangle the names somehow into e.g. ModelVersion_Version
or ModelVersionVersion
?
It would be perfect for me if we could just ignore these namespaces completely (as in, don't skip the interfaces but no need to include the namespace in the output), or at least have that as a option.
const { data: doc } = convertTypeScriptToCoreTypes(tsFile, {
namespace: 'ignore',
});
I've opened a PR (core-types-ts#10) to add basic namespace handling. Since my target use case needs namespaces to differentiate identically named interfaces, I've elected to format namespaces like ModelVersion.Version
, which works well with OAPI as the output target.
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hi,
It seems there is no namespace support for typeconv Example, this file sample.ts output nothing
export namespace ModelVersion { export interface Version { version: string; codename: string; id: string; } }
Best regards