Skip to content

Conversation

nikeokoronkwo
Copy link
Collaborator

@nikeokoronkwo nikeokoronkwo commented Aug 25, 2025

This PR makes a couple of fixes to the web-generator, as well as some minor additions to previous features

  • Improved exception for not finding type
  • Resolved def if cannot find file in path/module (i.e maybe a module already resolved by ts/node)
  • Added support for typedef in namespaces

- improved exception for not finding type
- resolved def if cannot find file in path/module (i.e maybe a module already resolved by ts/node)
Copy link
Contributor

@srujzs srujzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a test for this as well when you're ready.

final transformer =
if (src == null && !strictUnsupported) {
// print warning

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: need a warning :)

switch (decl.kind) {
case TSSyntaxKind.ClassDeclaration ||
TSSyntaxKind.InterfaceDeclaration:
final outputDecl = outputDecls.first as TypeDeclaration;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should these by single calls instead of first here and in the below cases (besides default)?

@@ -1527,6 +1520,17 @@ class Transformer {
bool isNotTypableDeclaration = false,
bool typeArg = false,
bool isNullable = false}) {
print((
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: stray print

@@ -1613,6 +1619,12 @@ class Transformer {
}

// get node finally
print((
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: stray print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants