Skip to content

Commit f51cc85

Browse files
[interop] Add Support for Namespaces (#436)
This issue adds support for namespaces, including generating code for namespaces, and performing lookup on namespaces/modules using qualified names, to map such names to actual TS declarations. Only exported declarations from the namespace are generated for, reducing the number of unnecessary declarations generated for. * wip: TSSyntaxKind for Namespaces * wip: namespace implementation * added support for nested namespace gen and filtering * formatting and analysis fixes * wip: namespace type resolution * implemented refactor of type deduction funcs and added support for namespace/module type deduction * Completed Namespace Refactor completed namespace type referencing, filtering, id modification and more to ens ditched the `emitChildren` method due to side effects, in favour of inclusion via the filtering process. Name is kept consistent thanks to parent reference. * implemented typealias resolution via import equals * formatting * complete import typealias support * namespace import already supported * removed print statements * resolved comments and issues * minor changes/updates * added new example and resolved deduping of nodes * updated use of camel_case_type ignore * comments on updateNSInParent
1 parent 1d5771b commit f51cc85

20 files changed

+1825
-432
lines changed

web_generator/lib/src/ast/base.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ class Options {}
1717

1818
class DeclarationOptions extends Options {
1919
bool override;
20+
bool static;
2021

21-
DeclarationOptions({this.override = false});
22+
DeclarationOptions({this.override = false, this.static = false});
2223

2324
TypeOptions toTypeOptions({bool nullable = false}) =>
2425
TypeOptions(nullable: nullable);

0 commit comments

Comments
 (0)