@alloy-js/typescript 0.25.0-dev.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/dev/src/builtins/index.js.map +1 -1
- package/dist/dev/src/builtins/node.js.map +1 -1
- package/dist/dev/src/components/ArrayExpression.js +8 -8
- package/dist/dev/src/components/ArrayExpression.js.map +1 -1
- package/dist/dev/src/components/ArrowFunction.js +3 -3
- package/dist/dev/src/components/ArrowFunction.js.map +1 -1
- package/dist/dev/src/components/BarrelFile.js.map +1 -1
- package/dist/dev/src/components/BlockScope.js.map +1 -1
- package/dist/dev/src/components/CallSignature.js +1 -0
- package/dist/dev/src/components/CallSignature.js.map +1 -1
- package/dist/dev/src/components/ClassDeclaration.js +4 -4
- package/dist/dev/src/components/ClassDeclaration.js.map +1 -1
- package/dist/dev/src/components/CommaList.js +1 -1
- package/dist/dev/src/components/CommaList.js.map +1 -1
- package/dist/dev/src/components/Declaration.js +4 -3
- package/dist/dev/src/components/Declaration.js.map +1 -1
- package/dist/dev/src/components/EnumDeclaration.js +2 -2
- package/dist/dev/src/components/EnumDeclaration.js.map +1 -1
- package/dist/dev/src/components/EnumMember.js +6 -6
- package/dist/dev/src/components/EnumMember.js.map +1 -1
- package/dist/dev/src/components/ExportStatement.js +1 -1
- package/dist/dev/src/components/ExportStatement.js.map +1 -1
- package/dist/dev/src/components/FunctionBase.js +27 -27
- package/dist/dev/src/components/FunctionBase.js.map +1 -1
- package/dist/dev/src/components/FunctionCallExpression.js +3 -3
- package/dist/dev/src/components/FunctionCallExpression.js.map +1 -1
- package/dist/dev/src/components/FunctionDeclaration.js +12 -12
- package/dist/dev/src/components/FunctionDeclaration.js.map +1 -1
- package/dist/dev/src/components/FunctionExpression.js +3 -3
- package/dist/dev/src/components/FunctionExpression.js.map +1 -1
- package/dist/dev/src/components/FunctionType.js +9 -9
- package/dist/dev/src/components/FunctionType.js.map +1 -1
- package/dist/dev/src/components/IfStatement.js +1 -0
- package/dist/dev/src/components/IfStatement.js.map +1 -1
- package/dist/dev/src/components/ImportStatement.js +1 -1
- package/dist/dev/src/components/ImportStatement.js.map +1 -1
- package/dist/dev/src/components/Interface.js +19 -19
- package/dist/dev/src/components/Interface.js.map +1 -1
- package/dist/dev/src/components/InterfaceMethod.js +2 -2
- package/dist/dev/src/components/InterfaceMethod.js.map +1 -1
- package/dist/dev/src/components/JSDoc.js.map +1 -1
- package/dist/dev/src/components/JSDocComment.js +1 -0
- package/dist/dev/src/components/JSDocComment.js.map +1 -1
- package/dist/dev/src/components/JSDocExample.js.map +1 -1
- package/dist/dev/src/components/JSDocParam.js.map +1 -1
- package/dist/dev/src/components/LexicalScope.js +1 -1
- package/dist/dev/src/components/LexicalScope.js.map +1 -1
- package/dist/dev/src/components/MemberDeclaration.js +1 -1
- package/dist/dev/src/components/MemberDeclaration.js.map +1 -1
- package/dist/dev/src/components/MemberExpression.js +24 -20
- package/dist/dev/src/components/MemberExpression.js.map +1 -1
- package/dist/dev/src/components/MemberScope.js +1 -1
- package/dist/dev/src/components/MemberScope.js.map +1 -1
- package/dist/dev/src/components/NewExpression.js +1 -1
- package/dist/dev/src/components/NewExpression.js.map +1 -1
- package/dist/dev/src/components/ObjectExpression.js +14 -14
- package/dist/dev/src/components/ObjectExpression.js.map +1 -1
- package/dist/dev/src/components/PackageDirectory.js.map +1 -1
- package/dist/dev/src/components/PackageJson.js.map +1 -1
- package/dist/dev/src/components/PropertyName.js +1 -1
- package/dist/dev/src/components/PropertyName.js.map +1 -1
- package/dist/dev/src/components/Reference.js +1 -1
- package/dist/dev/src/components/Reference.js.map +1 -1
- package/dist/dev/src/components/SingleLineCommentBlock.js.map +1 -1
- package/dist/dev/src/components/SourceFile.js.map +1 -1
- package/dist/dev/src/components/SwitchStatement.js +2 -2
- package/dist/dev/src/components/SwitchStatement.js.map +1 -1
- package/dist/dev/src/components/TryStatement.js +1 -1
- package/dist/dev/src/components/TryStatement.js.map +1 -1
- package/dist/dev/src/components/TryStatement.test.js.map +1 -1
- package/dist/dev/src/components/TsConfigJson.js.map +1 -1
- package/dist/dev/src/components/TypeDeclaration.js +5 -5
- package/dist/dev/src/components/TypeDeclaration.js.map +1 -1
- package/dist/dev/src/components/TypeRefContext.js.map +1 -1
- package/dist/dev/src/components/ValueExpression.js +2 -2
- package/dist/dev/src/components/ValueExpression.js.map +1 -1
- package/dist/dev/src/components/VarDeclaration.js +1 -1
- package/dist/dev/src/components/VarDeclaration.js.map +1 -1
- package/dist/dev/src/components/index.js +0 -1
- package/dist/dev/src/components/index.js.map +1 -1
- package/dist/dev/src/components/interface/expression.test.js.map +1 -1
- package/dist/dev/src/components/stc/index.js.map +1 -1
- package/dist/dev/src/context/index.js.map +1 -1
- package/dist/dev/src/context/package-metadata.js.map +1 -1
- package/dist/dev/src/context/type-ref-context.js.map +1 -1
- package/dist/dev/src/create-package.js.map +1 -1
- package/dist/dev/src/index.js +0 -1
- package/dist/dev/src/index.js.map +1 -1
- package/dist/dev/src/name-conflict-resolver.js.map +1 -1
- package/dist/dev/src/name-policy.js.map +1 -1
- package/dist/dev/src/parameter-descriptor.js.map +1 -1
- package/dist/dev/src/source-directory-data.js.map +1 -1
- package/dist/dev/src/symbols/index.js.map +1 -1
- package/dist/dev/src/symbols/reference.js +6 -6
- package/dist/dev/src/symbols/reference.js.map +1 -1
- package/dist/dev/src/symbols/scopes.js.map +1 -1
- package/dist/dev/src/symbols/ts-lexical-scope.js.map +1 -1
- package/dist/dev/src/symbols/ts-member-scope.js.map +1 -1
- package/dist/dev/src/symbols/ts-module-scope.js.map +1 -1
- package/dist/dev/src/symbols/ts-output-symbol.js.map +1 -1
- package/dist/dev/src/symbols/ts-package-scope.js.map +1 -1
- package/dist/dev/src/utils.js.map +1 -1
- package/dist/dev/test/array.test.js.map +1 -1
- package/dist/dev/test/arrow-function.test.js +38 -38
- package/dist/dev/test/arrow-function.test.js.map +1 -1
- package/dist/dev/test/barrel.test.js.map +1 -1
- package/dist/dev/test/basic.test.js.map +1 -1
- package/dist/dev/test/block-scope.test.js.map +1 -1
- package/dist/dev/test/class.test.js.map +1 -1
- package/dist/dev/test/decl-helpers.test.js +1 -1
- package/dist/dev/test/decl-helpers.test.js.map +1 -1
- package/dist/dev/test/enum-jsdoc.test.js.map +1 -1
- package/dist/dev/test/enum.test.js.map +1 -1
- package/dist/dev/test/externals.test.js +2 -2
- package/dist/dev/test/externals.test.js.map +1 -1
- package/dist/dev/test/function-call-expression.test.js.map +1 -1
- package/dist/dev/test/function-declaration-jsdoc.test.js.map +1 -1
- package/dist/dev/test/function-declaration.test.js +1 -1
- package/dist/dev/test/function-declaration.test.js.map +1 -1
- package/dist/dev/test/function-expression.test.js +38 -38
- package/dist/dev/test/function-expression.test.js.map +1 -1
- package/dist/dev/test/function-type.test.js +27 -27
- package/dist/dev/test/function-type.test.js.map +1 -1
- package/dist/dev/test/if-statement.test.js.map +1 -1
- package/dist/dev/test/imports-reactive.test.js.map +1 -1
- package/dist/dev/test/imports.test.js.map +1 -1
- package/dist/dev/test/interface-jsdoc.test.js.map +1 -1
- package/dist/dev/test/interface.test.js.map +1 -1
- package/dist/dev/test/jscomment.test.js.map +1 -1
- package/dist/dev/test/jsdoc.test.js.map +1 -1
- package/dist/dev/test/jsdocparam.test.js.map +1 -1
- package/dist/dev/test/member-expression.test.js +109 -42
- package/dist/dev/test/member-expression.test.js.map +1 -1
- package/dist/dev/test/name-conflict.test.js +3 -3
- package/dist/dev/test/name-conflict.test.js.map +1 -1
- package/dist/dev/test/name-policy.test.js.map +1 -1
- package/dist/dev/test/new-expression.test.js.map +1 -1
- package/dist/dev/test/object.test.js.map +1 -1
- package/dist/dev/test/package-external.test.js.map +1 -1
- package/dist/dev/test/package-json.test.js.map +1 -1
- package/dist/dev/test/package.test.js +1 -1
- package/dist/dev/test/package.test.js.map +1 -1
- package/dist/dev/test/reference.test.js +94 -2
- package/dist/dev/test/reference.test.js.map +1 -1
- package/dist/dev/test/source-file.test.js.map +1 -1
- package/dist/dev/test/switch-statement.test.js.map +1 -1
- package/dist/dev/test/utils.js +2 -2
- package/dist/dev/test/utils.js.map +1 -1
- package/dist/dev/test/value-expression.test.js.map +1 -1
- package/dist/dev/test/values.test.js.map +1 -1
- package/dist/dev/test/var-declaration-jsdoc.test.js.map +1 -1
- package/dist/dev/test/var-declaration.test.js +3 -3
- package/dist/dev/test/var-declaration.test.js.map +1 -1
- package/dist/dev/test/vitest.setup.js.map +1 -1
- package/dist/dev/testing/create-wrapper.js.map +1 -1
- package/dist/dev/testing/create-wrapper.test.js +19 -19
- package/dist/dev/testing/create-wrapper.test.js.map +1 -1
- package/dist/dev/testing/index.js.map +1 -1
- package/dist/src/builtins/index.js.map +1 -1
- package/dist/src/builtins/node.d.ts +1 -1
- package/dist/src/builtins/node.d.ts.map +1 -1
- package/dist/src/builtins/node.js.map +1 -1
- package/dist/src/components/ArrayExpression.d.ts +1 -1
- package/dist/src/components/ArrayExpression.d.ts.map +1 -1
- package/dist/src/components/ArrayExpression.js.map +1 -1
- package/dist/src/components/ArrowFunction.d.ts +1 -1
- package/dist/src/components/ArrowFunction.d.ts.map +1 -1
- package/dist/src/components/ArrowFunction.js.map +1 -1
- package/dist/src/components/BarrelFile.js.map +1 -1
- package/dist/src/components/BlockScope.d.ts +1 -1
- package/dist/src/components/BlockScope.d.ts.map +1 -1
- package/dist/src/components/BlockScope.js.map +1 -1
- package/dist/src/components/CallSignature.d.ts +1 -1
- package/dist/src/components/CallSignature.d.ts.map +1 -1
- package/dist/src/components/CallSignature.js +1 -0
- package/dist/src/components/CallSignature.js.map +1 -1
- package/dist/src/components/ClassDeclaration.d.ts +3 -3
- package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.js.map +1 -1
- package/dist/src/components/CommaList.d.ts +1 -1
- package/dist/src/components/CommaList.d.ts.map +1 -1
- package/dist/src/components/CommaList.js.map +1 -1
- package/dist/src/components/Declaration.d.ts +3 -3
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +2 -1
- package/dist/src/components/Declaration.js.map +1 -1
- package/dist/src/components/EnumDeclaration.d.ts +1 -1
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- package/dist/src/components/EnumDeclaration.js.map +1 -1
- package/dist/src/components/EnumMember.d.ts +1 -1
- package/dist/src/components/EnumMember.d.ts.map +1 -1
- package/dist/src/components/EnumMember.js.map +1 -1
- package/dist/src/components/ExportStatement.d.ts +1 -1
- package/dist/src/components/ExportStatement.d.ts.map +1 -1
- package/dist/src/components/ExportStatement.js.map +1 -1
- package/dist/src/components/FunctionBase.d.ts +1 -1
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js.map +1 -1
- package/dist/src/components/FunctionCallExpression.d.ts +1 -1
- package/dist/src/components/FunctionCallExpression.d.ts.map +1 -1
- package/dist/src/components/FunctionCallExpression.js.map +1 -1
- package/dist/src/components/FunctionDeclaration.d.ts +2 -2
- package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
- package/dist/src/components/FunctionDeclaration.js.map +1 -1
- package/dist/src/components/FunctionExpression.d.ts +1 -1
- package/dist/src/components/FunctionExpression.d.ts.map +1 -1
- package/dist/src/components/FunctionExpression.js.map +1 -1
- package/dist/src/components/FunctionType.d.ts +1 -1
- package/dist/src/components/FunctionType.d.ts.map +1 -1
- package/dist/src/components/FunctionType.js.map +1 -1
- package/dist/src/components/IfStatement.js +1 -0
- package/dist/src/components/IfStatement.js.map +1 -1
- package/dist/src/components/ImportStatement.d.ts +1 -1
- package/dist/src/components/ImportStatement.d.ts.map +1 -1
- package/dist/src/components/ImportStatement.js.map +1 -1
- package/dist/src/components/Interface.d.ts +3 -3
- package/dist/src/components/Interface.d.ts.map +1 -1
- package/dist/src/components/Interface.js.map +1 -1
- package/dist/src/components/InterfaceMethod.d.ts +3 -2
- package/dist/src/components/InterfaceMethod.d.ts.map +1 -1
- package/dist/src/components/InterfaceMethod.js.map +1 -1
- package/dist/src/components/JSDoc.js.map +1 -1
- package/dist/src/components/JSDocComment.js +1 -0
- package/dist/src/components/JSDocComment.js.map +1 -1
- package/dist/src/components/JSDocExample.js.map +1 -1
- package/dist/src/components/JSDocParam.d.ts +1 -1
- package/dist/src/components/JSDocParam.d.ts.map +1 -1
- package/dist/src/components/JSDocParam.js.map +1 -1
- package/dist/src/components/LexicalScope.d.ts +1 -1
- package/dist/src/components/LexicalScope.d.ts.map +1 -1
- package/dist/src/components/LexicalScope.js.map +1 -1
- package/dist/src/components/MemberDeclaration.d.ts +3 -3
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js.map +1 -1
- package/dist/src/components/MemberExpression.d.ts +1 -1
- package/dist/src/components/MemberExpression.d.ts.map +1 -1
- package/dist/src/components/MemberExpression.js +8 -4
- package/dist/src/components/MemberExpression.js.map +1 -1
- package/dist/src/components/MemberScope.d.ts +2 -2
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/MemberScope.js.map +1 -1
- package/dist/src/components/NewExpression.d.ts +1 -1
- package/dist/src/components/NewExpression.d.ts.map +1 -1
- package/dist/src/components/NewExpression.js.map +1 -1
- package/dist/src/components/ObjectExpression.d.ts +1 -1
- package/dist/src/components/ObjectExpression.d.ts.map +1 -1
- package/dist/src/components/ObjectExpression.js.map +1 -1
- package/dist/src/components/PackageDirectory.d.ts +3 -3
- package/dist/src/components/PackageDirectory.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.js.map +1 -1
- package/dist/src/components/PackageJson.js.map +1 -1
- package/dist/src/components/PropertyName.js.map +1 -1
- package/dist/src/components/Reference.d.ts +1 -1
- package/dist/src/components/Reference.d.ts.map +1 -1
- package/dist/src/components/Reference.js.map +1 -1
- package/dist/src/components/SingleLineCommentBlock.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts +2 -1
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/components/SwitchStatement.js.map +1 -1
- package/dist/src/components/TryStatement.js.map +1 -1
- package/dist/src/components/TryStatement.test.js.map +1 -1
- package/dist/src/components/TsConfigJson.js.map +1 -1
- package/dist/src/components/TypeDeclaration.d.ts +1 -1
- package/dist/src/components/TypeDeclaration.d.ts.map +1 -1
- package/dist/src/components/TypeDeclaration.js.map +1 -1
- package/dist/src/components/TypeRefContext.js.map +1 -1
- package/dist/src/components/ValueExpression.d.ts +1 -1
- package/dist/src/components/ValueExpression.d.ts.map +1 -1
- package/dist/src/components/ValueExpression.js.map +1 -1
- package/dist/src/components/VarDeclaration.d.ts +2 -2
- package/dist/src/components/VarDeclaration.d.ts.map +1 -1
- package/dist/src/components/VarDeclaration.js.map +1 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +0 -1
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/interface/expression.test.js.map +1 -1
- package/dist/src/components/stc/index.js.map +1 -1
- package/dist/src/context/index.js.map +1 -1
- package/dist/src/context/package-metadata.d.ts +2 -2
- package/dist/src/context/package-metadata.d.ts.map +1 -1
- package/dist/src/context/package-metadata.js.map +1 -1
- package/dist/src/context/type-ref-context.d.ts +1 -1
- package/dist/src/context/type-ref-context.d.ts.map +1 -1
- package/dist/src/context/type-ref-context.js.map +1 -1
- package/dist/src/create-package.d.ts +2 -1
- package/dist/src/create-package.d.ts.map +1 -1
- package/dist/src/create-package.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/name-conflict-resolver.d.ts +1 -1
- package/dist/src/name-conflict-resolver.d.ts.map +1 -1
- package/dist/src/name-conflict-resolver.js.map +1 -1
- package/dist/src/name-policy.d.ts +1 -1
- package/dist/src/name-policy.d.ts.map +1 -1
- package/dist/src/name-policy.js.map +1 -1
- package/dist/src/parameter-descriptor.js.map +1 -1
- package/dist/src/source-directory-data.d.ts +2 -2
- package/dist/src/source-directory-data.d.ts.map +1 -1
- package/dist/src/source-directory-data.js.map +1 -1
- package/dist/src/symbols/index.d.ts +3 -2
- package/dist/src/symbols/index.d.ts.map +1 -1
- package/dist/src/symbols/index.js.map +1 -1
- package/dist/src/symbols/reference.d.ts +2 -2
- package/dist/src/symbols/reference.d.ts.map +1 -1
- package/dist/src/symbols/reference.js.map +1 -1
- package/dist/src/symbols/scopes.d.ts +2 -2
- package/dist/src/symbols/scopes.d.ts.map +1 -1
- package/dist/src/symbols/scopes.js.map +1 -1
- package/dist/src/symbols/ts-lexical-scope.js.map +1 -1
- package/dist/src/symbols/ts-member-scope.d.ts +3 -3
- package/dist/src/symbols/ts-member-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-member-scope.js.map +1 -1
- package/dist/src/symbols/ts-module-scope.d.ts +1 -1
- package/dist/src/symbols/ts-module-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-module-scope.js.map +1 -1
- package/dist/src/symbols/ts-output-symbol.d.ts +3 -2
- package/dist/src/symbols/ts-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/ts-output-symbol.js.map +1 -1
- package/dist/src/symbols/ts-package-scope.d.ts +3 -2
- package/dist/src/symbols/ts-package-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-package-scope.js.map +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/test/array.test.js.map +1 -1
- package/dist/test/arrow-function.test.js.map +1 -1
- package/dist/test/barrel.test.js.map +1 -1
- package/dist/test/basic.test.js.map +1 -1
- package/dist/test/block-scope.test.js.map +1 -1
- package/dist/test/class.test.js.map +1 -1
- package/dist/test/decl-helpers.test.js.map +1 -1
- package/dist/test/enum-jsdoc.test.js.map +1 -1
- package/dist/test/enum.test.js.map +1 -1
- package/dist/test/externals.test.js.map +1 -1
- package/dist/test/function-call-expression.test.js.map +1 -1
- package/dist/test/function-declaration-jsdoc.test.js.map +1 -1
- package/dist/test/function-declaration.test.js.map +1 -1
- package/dist/test/function-expression.test.js.map +1 -1
- package/dist/test/function-type.test.js.map +1 -1
- package/dist/test/if-statement.test.js.map +1 -1
- package/dist/test/imports-reactive.test.js.map +1 -1
- package/dist/test/imports.test.js.map +1 -1
- package/dist/test/interface-jsdoc.test.js.map +1 -1
- package/dist/test/interface.test.js.map +1 -1
- package/dist/test/jscomment.test.js.map +1 -1
- package/dist/test/jsdoc.test.js.map +1 -1
- package/dist/test/jsdocparam.test.js.map +1 -1
- package/dist/test/member-expression.test.js +31 -0
- package/dist/test/member-expression.test.js.map +1 -1
- package/dist/test/name-conflict.test.js.map +1 -1
- package/dist/test/name-policy.test.js.map +1 -1
- package/dist/test/new-expression.test.js.map +1 -1
- package/dist/test/object.test.js.map +1 -1
- package/dist/test/package-external.test.js.map +1 -1
- package/dist/test/package-json.test.js.map +1 -1
- package/dist/test/package.test.js.map +1 -1
- package/dist/test/reference.test.js +46 -2
- package/dist/test/reference.test.js.map +1 -1
- package/dist/test/source-file.test.js.map +1 -1
- package/dist/test/switch-statement.test.js.map +1 -1
- package/dist/test/utils.d.ts +1 -1
- package/dist/test/utils.d.ts.map +1 -1
- package/dist/test/utils.js.map +1 -1
- package/dist/test/value-expression.test.js.map +1 -1
- package/dist/test/values.test.js.map +1 -1
- package/dist/test/var-declaration-jsdoc.test.js.map +1 -1
- package/dist/test/var-declaration.test.js.map +1 -1
- package/dist/test/vitest.setup.js.map +1 -1
- package/dist/testing/create-wrapper.js.map +1 -1
- package/dist/testing/create-wrapper.test.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/ArrowFunction.md +9 -9
- package/docs/api/components/BlockScope.md +20 -20
- package/docs/api/components/CallSignature.md +7 -7
- package/docs/api/components/CatchClause.md +4 -4
- package/docs/api/components/ClassDeclaration.md +4 -4
- package/docs/api/components/ClassField.md +15 -15
- package/docs/api/components/ClassMember.md +12 -12
- package/docs/api/components/ClassMethod.md +19 -19
- package/docs/api/components/Declaration.md +16 -16
- package/docs/api/components/EnumMember.md +8 -8
- package/docs/api/components/ExportStatement.md +4 -4
- package/docs/api/components/FunctionCallExpression.md +4 -4
- package/docs/api/components/FunctionDeclaration.md +9 -9
- package/docs/api/components/FunctionExpression.md +9 -9
- package/docs/api/components/InterfaceDeclaration.md +4 -4
- package/docs/api/components/InterfaceMember.md +18 -18
- package/docs/api/components/InterfaceMethod.md +12 -12
- package/docs/api/components/NewExpression.md +4 -4
- package/docs/api/components/ObjectExpression.md +1 -1
- package/docs/api/components/ObjectProperty.md +8 -8
- package/docs/api/components/ObjectSpreadProperty.md +5 -5
- package/docs/api/components/PackageDirectory.md +2 -2
- package/docs/api/components/PackageJsonFile.md +16 -16
- package/docs/api/components/SourceFile.md +7 -7
- package/docs/api/components/VarDeclaration.md +8 -8
- package/docs/api/functions/createInstanceMemberSymbol.md +16 -16
- package/docs/api/functions/createLexicalScope.md +5 -5
- package/docs/api/functions/createMemberScope.md +5 -5
- package/docs/api/functions/createMemberSymbol.md +16 -16
- package/docs/api/functions/createPrivateInstanceMemberSymbol.md +16 -16
- package/docs/api/functions/createPrivateStaticMemberSymbol.md +16 -16
- package/docs/api/functions/createStaticMemberSymbol.md +16 -16
- package/docs/api/functions/createTypeAndValueSymbol.md +16 -16
- package/docs/api/functions/createTypeSymbol.md +16 -16
- package/docs/api/functions/createValueSymbol.md +16 -16
- package/docs/api/functions/decl.md +16 -16
- package/docs/api/functions/declMember.md +16 -16
- package/docs/api/functions/declType.md +16 -16
- package/docs/api/types/CreateTsSymbolOptions.md +6 -6
- package/docs/api/types/DeclarationPropsBase.md +4 -4
- package/docs/api/types/FunctionBodyProps.md +3 -3
- package/docs/api/types/FunctionParametersProps.md +4 -4
- package/docs/api/types/FunctionTypeParametersProps.md +4 -4
- package/docs/api/types/FunctionTypeProps.md +5 -5
- package/docs/api/types/InterfaceExpressionProps.md +3 -3
- package/docs/api/types/InterfaceMemberPropsBase.md +7 -7
- package/docs/api/types/MemberExpressionPartProps.md +11 -11
- package/docs/api/types/ModuleSymbolsDescriptor.md +4 -4
- package/docs/api/types/ParameterDescriptor.md +3 -3
- package/docs/api/types/ParameterDescriptorBase.md +10 -10
- package/docs/api/types/SourceFileHeaderProps.md +4 -4
- package/docs/api/types/TypeParameterDescriptor.md +7 -7
- package/docs/api/types/TypeParametersProps.md +4 -4
- package/package.json +7 -7
- package/src/builtins/node.ts +1 -1
- package/src/components/ArrayExpression.tsx +2 -1
- package/src/components/ArrowFunction.tsx +2 -1
- package/src/components/BarrelFile.tsx +1 -1
- package/src/components/BlockScope.tsx +2 -2
- package/src/components/CallSignature.tsx +1 -1
- package/src/components/ClassDeclaration.tsx +5 -5
- package/src/components/CommaList.tsx +2 -1
- package/src/components/Declaration.tsx +7 -13
- package/src/components/EnumDeclaration.tsx +1 -1
- package/src/components/EnumMember.tsx +2 -1
- package/src/components/ExportStatement.tsx +1 -1
- package/src/components/FunctionBase.tsx +4 -7
- package/src/components/FunctionCallExpression.tsx +2 -1
- package/src/components/FunctionDeclaration.tsx +4 -2
- package/src/components/FunctionExpression.tsx +2 -1
- package/src/components/FunctionType.tsx +2 -1
- package/src/components/ImportStatement.tsx +1 -1
- package/src/components/Interface.tsx +4 -5
- package/src/components/InterfaceMethod.tsx +3 -3
- package/src/components/JSDocParam.tsx +1 -1
- package/src/components/LexicalScope.tsx +2 -1
- package/src/components/MemberDeclaration.tsx +6 -8
- package/src/components/MemberExpression.tsx +28 -20
- package/src/components/MemberScope.tsx +3 -6
- package/src/components/NewExpression.tsx +2 -4
- package/src/components/ObjectExpression.tsx +1 -3
- package/src/components/PackageDirectory.tsx +5 -5
- package/src/components/PropertyName.tsx +1 -1
- package/src/components/Reference.tsx +2 -1
- package/src/components/SourceFile.tsx +1 -1
- package/src/components/TypeDeclaration.tsx +2 -1
- package/src/components/ValueExpression.tsx +2 -1
- package/src/components/VarDeclaration.tsx +2 -2
- package/src/components/index.ts +1 -1
- package/src/context/package-metadata.ts +3 -2
- package/src/context/type-ref-context.tsx +2 -5
- package/src/create-package.ts +1 -2
- package/src/index.ts +1 -1
- package/src/name-conflict-resolver.ts +3 -2
- package/src/name-policy.ts +2 -1
- package/src/source-directory-data.ts +3 -2
- package/src/symbols/index.ts +3 -3
- package/src/symbols/reference.tsx +6 -4
- package/src/symbols/scopes.ts +2 -2
- package/src/symbols/ts-member-scope.ts +3 -3
- package/src/symbols/ts-module-scope.ts +2 -6
- package/src/symbols/ts-output-symbol.ts +2 -4
- package/src/symbols/ts-package-scope.ts +3 -7
- package/src/utils.ts +1 -1
- package/temp/api.json +1 -1
- package/test/arrow-function.test.tsx +3 -2
- package/test/function-declaration.test.tsx +2 -2
- package/test/function-expression.test.tsx +3 -2
- package/test/function-type.test.tsx +3 -2
- package/test/interface.test.tsx +2 -2
- package/test/member-expression.test.tsx +24 -1
- package/test/name-conflict.test.tsx +4 -3
- package/test/reference.test.tsx +40 -1
- package/test/utils.tsx +2 -1
- package/testing/create-wrapper.test.tsx +2 -1
- package/tsdoc-metadata.json +1 -1
- package/vitest.config.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../test/var-declaration.test.tsx"],"sourcesContent":["import {\n memberRefkey,\n namekey,\n Output,\n refkey,\n StatementList,\n} from \"@alloy-js/core\";\nimport { expect, it } from \"vitest\";\n\nimport * as ts from \"../src/index.js\";\n\nit(\"works\", () => {\n expect(\n <Output>\n <ts.SourceFile path=\"test.js\">\n <ts.VarDeclaration name=\"hi\" initializer=\"12\" />;\n </ts.SourceFile>\n </Output>,\n ).toRenderTo(\"const hi = 12;\");\n});\n\nit(\"allows omitting the initializer\", () => {\n expect(\n <Output>\n <ts.SourceFile path=\"test.js\">\n <ts.VarDeclaration let name=\"hi\" />;\n </ts.SourceFile>\n </Output>,\n ).toRenderTo(\"let hi;\");\n});\n\nit(\"takes namekeys\", () => {\n expect(\n <Output>\n <ts.SourceFile path=\"test.js\">\n <ts.VarDeclaration name={namekey(\"foo\")} initializer=\"12\" />;\n </ts.SourceFile>\n </Output>,\n ).toRenderTo(\"const foo = 12;\");\n});\n\nit(\"works end-to-end\", () => {\n const TestType = refkey(\"TestType\");\n\n expect(\n <Output>\n <ts.SourceFile path=\"types.ts\">\n <ts.TypeDeclaration name=\"TestType\" refkey={TestType}>\n \"hello\" | \"goodbye\"\n </ts.TypeDeclaration>\n </ts.SourceFile>\n <ts.SourceFile path=\"test.ts\">\n <ts.VarDeclaration\n export\n let\n name=\"hi\"\n type={<ts.Reference refkey={TestType} />}\n >\n \"hello\"\n </ts.VarDeclaration>\n ;\n </ts.SourceFile>\n </Output>,\n ).toRenderTo({\n \"types.ts\": `\n type TestType = \"hello\" | \"goodbye\";\n `,\n \"test.ts\": `\n import type { TestType } from \"./types.js\";\n\n export let hi: TestType = \"hello\";\n `,\n });\n});\n\nit(\"instantiates symbols from its type\", () => {\n const ifaceRk = refkey();\n const ifaceMemberRk = refkey();\n const classRk = refkey();\n const classMemberRk = refkey();\n const v1Rk = refkey();\n const v2Rk = refkey();\n\n expect(\n <Output>\n <ts.SourceFile path=\"inst.ts\">\n <StatementList>\n <ts.VarDeclaration export name=\"one\" refkey={v1Rk} type={classRk}>\n \"test\"\n </ts.VarDeclaration>\n <>{memberRefkey(v1Rk, classMemberRk)}</>\n <ts.VarDeclaration export name=\"two\" refkey={v2Rk} type={ifaceRk}>\n \"test\"\n </ts.VarDeclaration>\n <>{memberRefkey(v2Rk, ifaceMemberRk)}</>\n </StatementList>\n </ts.SourceFile>\n <ts.SourceFile path=\"decl.ts\">\n <ts.InterfaceDeclaration name=\"Foo\" refkey={ifaceRk}>\n <StatementList>\n <ts.InterfaceMember name=\"instanceProp\" refkey={ifaceMemberRk}>\n 42\n </ts.InterfaceMember>\n </StatementList>\n </ts.InterfaceDeclaration>\n <ts.ClassDeclaration name=\"Bar\" refkey={classRk}>\n <StatementList>\n <ts.ClassField name=\"instanceProp\" refkey={classMemberRk}>\n 42\n </ts.ClassField>\n </StatementList>\n </ts.ClassDeclaration>\n </ts.SourceFile>\n </Output>,\n ).toRenderTo({\n \"decl.ts\": `\n interface Foo {\n instanceProp: 42;\n }class Bar {\n instanceProp = 42;\n }\n `,\n \"inst.ts\": `\n import type { Bar, Foo } from \"./decl.js\";\n\n export const one: Bar = \"test\";\n one.instanceProp;\n export const two: Foo = \"test\";\n two.instanceProp;\n `,\n });\n});\n\nit(\"instantiates symbols from type even when an expression is passed\", () => {\n const classRk = refkey();\n const classMemberRk = refkey();\n const v1Rk = refkey();\n\n expect(\n <Output>\n <ts.SourceFile path=\"inst.ts\">\n <StatementList>\n <ts.VarDeclaration export name=\"one\" refkey={v1Rk} type={classRk}>\n <ts.ObjectExpression>\n <ts.ObjectProperty name=\"noProp\" refkey={refkey()} value=\"1\" />\n </ts.ObjectExpression>\n </ts.VarDeclaration>\n <>{memberRefkey(v1Rk, classMemberRk)}</>\n </StatementList>\n </ts.SourceFile>\n <ts.SourceFile path=\"decl.ts\">\n <ts.ClassDeclaration name=\"Bar\" refkey={classRk}>\n <StatementList>\n <ts.ClassField name=\"instanceProp\" refkey={classMemberRk}>\n 42\n </ts.ClassField>\n </StatementList>\n </ts.ClassDeclaration>\n </ts.SourceFile>\n </Output>,\n ).toRenderTo({\n \"decl.ts\": `\n class Bar {\n instanceProp = 42;\n }\n `,\n \"inst.ts\": `\n import type { Bar } from \"./decl.js\";\n\n export const one: Bar = {\n noProp: 1\n };\n one.instanceProp;\n `,\n });\n});\n"],"mappings":";AAAA,SACE,YAAY,EACZ,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAAa,QACR,gBAAgB;AACvB,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,OAAO,KAAK,EAAE,MAAM,iBAAiB;AAErC,EAAE,CAAC,OAAO,EAAE,MAAM;EAChB,MAAM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[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../test/vitest.setup.ts"],"sourcesContent":["import \"@alloy-js/core/testing\";\n"],"mappings":"AAAA,OAAO,wBAAwB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../testing/create-wrapper.tsx"],"sourcesContent":["import { createTestWrapper, type TestWrapper } from \"@alloy-js/core/testing\";\n\nimport { SourceFile } from \"#components/index.js\";\n\nimport { TSOutputSymbol, useTSScope } from \"../src/index.js\";\n\nexport function createTSTestWrapper(): TestWrapper {\n return createTestWrapper({\n filePath: \"test.ts\",\n useScope: useTSScope,\n makeSymbol: (nk, scope) => new TSOutputSymbol(nk, scope.spaces),\n SourceFile,\n });\n}\n"],"mappings":"AAAA,SAAS,iBAAiB,QAA0B,wBAAwB;AAE5E,SAAS,UAAU,QAAQ,sBAAsB;AAEjD,SAAS,cAAc,EAAE,UAAU,QAAQ,iBAAiB;AAE5D,OAAO,SAAS,mBAAmB,GAAgB;EACjD,OAAO,iBAAiB,CAAC;IACvB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,CAAC,EAAE,EAAE,KAAK,KAAK,IAAI,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC;IAC/D;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -11,11 +11,11 @@ it("should render defkey inline", async () => {
|
|
|
11
11
|
} = createTSTestWrapper();
|
|
12
12
|
expect(_$createComponent(Wrapper, {
|
|
13
13
|
get children() {
|
|
14
|
-
return ["return ", _$memo(() => defkey("myResult"), false, "defkey(
|
|
14
|
+
return ["return ", _$memo(() => defkey("myResult"), false, "defkey(…)"), ";"];
|
|
15
15
|
}
|
|
16
16
|
}, {
|
|
17
17
|
fileName: import.meta.url,
|
|
18
|
-
lineNumber:
|
|
18
|
+
lineNumber: 17,
|
|
19
19
|
columnNumber: 10
|
|
20
20
|
})).toRenderTo(`return myResult;`);
|
|
21
21
|
});
|
|
@@ -42,7 +42,7 @@ it("reuses declarations across multiple usage sites", () => {
|
|
|
42
42
|
}]
|
|
43
43
|
}, {
|
|
44
44
|
fileName: import.meta.url,
|
|
45
|
-
lineNumber:
|
|
45
|
+
lineNumber: 31,
|
|
46
46
|
columnNumber: 11
|
|
47
47
|
}), _$createComponent(ClassMethod, {
|
|
48
48
|
name: "b",
|
|
@@ -53,25 +53,25 @@ it("reuses declarations across multiple usage sites", () => {
|
|
|
53
53
|
}]
|
|
54
54
|
}, {
|
|
55
55
|
fileName: import.meta.url,
|
|
56
|
-
lineNumber:
|
|
56
|
+
lineNumber: 36,
|
|
57
57
|
columnNumber: 11
|
|
58
58
|
})];
|
|
59
59
|
}
|
|
60
60
|
}, {
|
|
61
61
|
fileName: import.meta.url,
|
|
62
|
-
lineNumber:
|
|
62
|
+
lineNumber: 30,
|
|
63
63
|
columnNumber: 9
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}, {
|
|
67
67
|
fileName: import.meta.url,
|
|
68
|
-
lineNumber:
|
|
68
|
+
lineNumber: 29,
|
|
69
69
|
columnNumber: 7
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
}, {
|
|
73
73
|
fileName: import.meta.url,
|
|
74
|
-
lineNumber:
|
|
74
|
+
lineNumber: 28,
|
|
75
75
|
columnNumber: 5
|
|
76
76
|
})).toRenderTo(d`
|
|
77
77
|
class A {
|
|
@@ -104,7 +104,7 @@ it("reuses declarations across multiple defkeys", () => {
|
|
|
104
104
|
}
|
|
105
105
|
}, {
|
|
106
106
|
fileName: import.meta.url,
|
|
107
|
-
lineNumber:
|
|
107
|
+
lineNumber: 58,
|
|
108
108
|
columnNumber: 11
|
|
109
109
|
}), _$createComponent(ClassMethod, {
|
|
110
110
|
name: "b",
|
|
@@ -119,25 +119,25 @@ it("reuses declarations across multiple defkeys", () => {
|
|
|
119
119
|
}
|
|
120
120
|
}, {
|
|
121
121
|
fileName: import.meta.url,
|
|
122
|
-
lineNumber:
|
|
122
|
+
lineNumber: 63,
|
|
123
123
|
columnNumber: 11
|
|
124
124
|
})];
|
|
125
125
|
}
|
|
126
126
|
}, {
|
|
127
127
|
fileName: import.meta.url,
|
|
128
|
-
lineNumber:
|
|
128
|
+
lineNumber: 57,
|
|
129
129
|
columnNumber: 9
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
}, {
|
|
133
133
|
fileName: import.meta.url,
|
|
134
|
-
lineNumber:
|
|
134
|
+
lineNumber: 56,
|
|
135
135
|
columnNumber: 7
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
}, {
|
|
139
139
|
fileName: import.meta.url,
|
|
140
|
-
lineNumber:
|
|
140
|
+
lineNumber: 55,
|
|
141
141
|
columnNumber: 5
|
|
142
142
|
})).toRenderTo(d`
|
|
143
143
|
class A {
|
|
@@ -154,7 +154,7 @@ it("should render defkey in nested component", async () => {
|
|
|
154
154
|
}
|
|
155
155
|
}, {
|
|
156
156
|
fileName: import.meta.url,
|
|
157
|
-
lineNumber:
|
|
157
|
+
lineNumber: 80,
|
|
158
158
|
columnNumber: 12
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -173,19 +173,19 @@ it("should render defkey in nested component", async () => {
|
|
|
173
173
|
}
|
|
174
174
|
}, {
|
|
175
175
|
fileName: import.meta.url,
|
|
176
|
-
lineNumber:
|
|
176
|
+
lineNumber: 88,
|
|
177
177
|
columnNumber: 9
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
}, {
|
|
181
181
|
fileName: import.meta.url,
|
|
182
|
-
lineNumber:
|
|
182
|
+
lineNumber: 87,
|
|
183
183
|
columnNumber: 7
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
187
|
fileName: import.meta.url,
|
|
188
|
-
lineNumber:
|
|
188
|
+
lineNumber: 86,
|
|
189
189
|
columnNumber: 5
|
|
190
190
|
})).toRenderTo(d`
|
|
191
191
|
class MyClass {
|
|
@@ -209,19 +209,19 @@ it("should render defkey in class property", async () => {
|
|
|
209
209
|
}
|
|
210
210
|
}, {
|
|
211
211
|
fileName: import.meta.url,
|
|
212
|
-
lineNumber:
|
|
212
|
+
lineNumber: 103,
|
|
213
213
|
columnNumber: 9
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
}, {
|
|
217
217
|
fileName: import.meta.url,
|
|
218
|
-
lineNumber:
|
|
218
|
+
lineNumber: 102,
|
|
219
219
|
columnNumber: 7
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
}, {
|
|
223
223
|
fileName: import.meta.url,
|
|
224
|
-
lineNumber:
|
|
224
|
+
lineNumber: 101,
|
|
225
225
|
columnNumber: 5
|
|
226
226
|
})).toRenderTo(d`
|
|
227
227
|
class TestClass {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../testing/create-wrapper.test.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\nimport { List } from \"@alloy-js/core\";\nimport { d } from \"@alloy-js/core/testing\";\nimport { expect, it } from \"vitest\";\n\nimport {\n ClassDeclaration,\n ClassField,\n ClassMethod,\n} from \"#components/index.js\";\n\nimport { createTSTestWrapper } from \"./create-wrapper.jsx\";\n\nit(\"should render defkey inline\", async () => {\n const { Wrapper, defkey } = createTSTestWrapper();\n\n expect(<Wrapper>return {defkey(\"myResult\")};</Wrapper>).toRenderTo(\n `return myResult;`,\n );\n});\n\nit(\"reuses declarations across multiple usage sites\", () => {\n const { Wrapper, defkey } = createTSTestWrapper();\n const T = defkey(\"Thing\");\n const R = defkey(\"Result\");\n\n expect(\n <Wrapper>\n <ClassDeclaration name=\"A\">\n <List>\n <ClassMethod\n name=\"a\"\n returnType={R}\n parameters={[{ name: \"x\", type: T }]}\n />\n <ClassMethod\n name=\"b\"\n returnType={R}\n parameters={[{ name: \"y\", type: T }]}\n />\n </List>\n </ClassDeclaration>\n </Wrapper>,\n ).toRenderTo(d`\n class A {\n a(x: Thing): Result {}\n b(y: Thing): Result {}\n }`);\n});\n\nit(\"reuses declarations across multiple defkeys\", () => {\n const { Wrapper, defkey } = createTSTestWrapper();\n\n expect(\n <Wrapper>\n <ClassDeclaration name=\"A\">\n <List>\n <ClassMethod\n name=\"a\"\n returnType={defkey(\"Result\")}\n parameters={[{ name: \"x\", type: defkey(\"Thing\") }]}\n />\n <ClassMethod\n name=\"b\"\n returnType={defkey(\"Result\")}\n parameters={[{ name: \"y\", type: defkey(\"Thing\") }]}\n />\n </List>\n </ClassDeclaration>\n </Wrapper>,\n ).toRenderTo(d`\n class A {\n a(x: Thing): Result {}\n b(y: Thing): Result {}\n }`);\n});\n\nit(\"should render defkey in nested component\", async () => {\n function TestComponent(props: { returnTypeRef: Refkey }) {\n return <ClassMethod name=\"foo\" returnType={props.returnTypeRef} />;\n }\n\n const { Wrapper, defkey } = createTSTestWrapper();\n\n expect(\n <Wrapper>\n <ClassDeclaration name=\"MyClass\">\n <TestComponent returnTypeRef={defkey(\"MyType\")} />\n </ClassDeclaration>\n </Wrapper>,\n ).toRenderTo(d`\n class MyClass {\n foo(): MyType {}\n }`);\n});\n\nit(\"should render defkey in class property\", async () => {\n const { Wrapper, defkey } = createTSTestWrapper();\n\n expect(\n <Wrapper>\n <ClassDeclaration name=\"TestClass\">\n <ClassField name=\"MyProperty\" type={defkey(\"MyType\")} />\n </ClassDeclaration>\n </Wrapper>,\n ).toRenderTo(d`\n class TestClass {\n MyProperty: MyType\n }`);\n});\n"],"mappings":";AACA,SAAS,IAAI,QAAQ,gBAAgB;AACrC,SAAS,CAAC,QAAQ,wBAAwB;AAC1C,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SACE,gBAAgB,EAChB,UAAU,EACV,WAAW,QACN,sBAAsB;AAE7B,SAAS,mBAAmB;AAE5B,EAAE,CAAC,6BAA6B,EAAE,YAAY;EAC5C,MAAM;IAAE,O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AAA;EAAA,EAGpD,CAAC,CAAC,UAAU,CAAC,CAAC;AAChB;AACA;AACA,MAAM,CAAC;AACP,CAAC,CAAC;AAEF,EAAE,CAAC,wCAAwC,EAAE,YAAY;EACvD,MAAM;IAAE,OAAO;IAAE;EAAO,CAAC,GAAG,mBAAmB,CAAC,CAAC;EAEjD,MAAM,mBACH,OAAO;IAAA;MAAA,yBACL,gBAAgB;QAAC,IAAI;QAAA;UAAA,yBACnB,UAAU;YAAC,IAAI;YAAA,IAAc,IAAI;cAAA,OAAE,MAAM,CAAC,QAAQ,CAAC;YAAA;UAAA;YAAA;YAAA;YAAA;UAAA;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAG1D,CAAC,CAAC,UAAU,CAAC,CAAC;AAChB;AACA;AACA,MAAM,CAAC;AACP,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../testing/index.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../testing/index.ts"],"sourcesContent":["export * from \"./create-wrapper.jsx\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/builtins/index.ts"],"sourcesContent":["export * as node from \"./node.js\";\n"],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/builtins/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/builtins/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAOpD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;4EA2Bf,CAAC;AAEH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kEAqJb,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAoCf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/builtins/node.ts"],"sourcesContent":["import type { SymbolCreator } from \"@alloy-js/core\";\n\nimport { createPackage } from \"../create-package.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype dummy = SymbolCreator;\n\nexport const path = createPackage({\n name: \"node:path\",\n version: \"22.5.1\",\n builtin: true,\n descriptor: {\n \".\": {\n default: \"path\",\n named: [\n \"basename\",\n \"delimeter\",\n \"dirname\",\n \"extname\",\n \"format\",\n \"matchesGlob\",\n \"isAbsolute\",\n \"join\",\n \"normalize\",\n \"parse\",\n \"posix\",\n \"relative\",\n \"resolve\",\n \"sep\",\n \"toNamespacedPath\",\n \"win32\",\n ],\n },\n },\n});\n\nexport const fs = createPackage({\n name: \"node:fs\",\n version: \"22.5.1\",\n builtin: true,\n descriptor: {\n \".\": {\n default: \"fs\",\n named: [\n \"access\",\n \"appendFile\",\n \"chmod\",\n \"chown\",\n \"close\",\n \"copyFile\",\n \"cp\",\n \"createReadStream\",\n \"createWriteStream\",\n \"exists\",\n \"fchmod\",\n \"fchown\",\n \"fdatasync\",\n \"fstat\",\n \"fsync\",\n \"ftruncate\",\n \"futimes\",\n \"glob\",\n \"lchmod\",\n \"lchown\",\n \"lutimes\",\n \"link\",\n \"lstat\",\n \"mkdir\",\n \"mkdtemp\",\n \"open\",\n \"openAsBlob\",\n \"opendir\",\n \"read\",\n \"read\",\n \"read\",\n \"readdir\",\n \"readFile\",\n \"readlink\",\n \"readv\",\n \"realpath\",\n \"realpath\",\n \"rename\",\n \"rmdir\",\n \"rm\",\n \"stat\",\n \"statfs\",\n \"symlink\",\n \"truncate\",\n \"unlink\",\n \"unwatchFile\",\n \"utimes\",\n \"watch\",\n \"watchFile\",\n \"write\",\n \"write\",\n \"write\",\n \"writeFile\",\n \"writev\",\n \"accessSync\",\n \"appendFileSync\",\n \"chmodSync\",\n \"chownSync\",\n \"closeSync\",\n \"copyFileSync\",\n \"cpSync\",\n \"existsSync\",\n \"fchmodSync\",\n \"fchownSync\",\n \"fdatasyncSync\",\n \"fstatSync\",\n \"fsyncSync\",\n \"ftruncateSync\",\n \"futimesSync\",\n \"globSync\",\n \"lchmodSync\",\n \"lchownSync\",\n \"lutimesSync\",\n \"linkSync\",\n \"lstatSync\",\n \"mkdirSync\",\n \"mkdtempSync\",\n \"opendirSync\",\n \"openSync\",\n \"readdirSync\",\n \"readFileSync\",\n \"readlinkSync\",\n \"readSync\",\n \"readSync\",\n \"readvSync\",\n \"realpathSync\",\n \"realpathSync\",\n \"renameSync\",\n \"rmdirSync\",\n \"rmSync\",\n \"statSync\",\n \"statfsSync\",\n \"symlinkSync\",\n \"truncateSync\",\n \"unlinkSync\",\n \"utimesSync\",\n \"writeFileSync\",\n \"writeSync\",\n \"writeSync\",\n \"writeSync\",\n \"writevSync\",\n ],\n },\n \"./promises\": {\n default: \"fs\",\n named: [\n \"access\",\n \"appendFile\",\n \"chmod\",\n \"chown\",\n \"copyFile\",\n \"cp\",\n \"glob\",\n \"lchmod\",\n \"lchown\",\n \"lutimes\",\n \"link\",\n \"lstat\",\n \"mkdir\",\n \"mkdtemp\",\n \"open\",\n \"opendir\",\n \"readdir\",\n \"readFile\",\n \"readLink\",\n \"realpath\",\n \"rename\",\n \"rmdir\",\n \"rm\",\n \"stat\",\n \"statfs\",\n \"symlink\",\n \"truncate\",\n \"unlink\",\n \"utimes\",\n \"watch\",\n \"writeFile\",\n \"constants\",\n ],\n },\n },\n});\n\nexport const util = createPackage({\n name: \"node:util\",\n version: \"22.5.1\",\n builtin: true,\n descriptor: {\n \".\": {\n default: \"util\",\n named: [\n \"callbackify\",\n \"debuglog\",\n \"debug\",\n \"deprecate\",\n \"format\",\n \"formatWithOptions\",\n \"getSystemErrorName\",\n \"getSystemErrorMap\",\n \"inherits\",\n \"inspect\",\n \"isDeepStrictEqual\",\n \"MIMEType\",\n \"MIMEParams\",\n \"parseArgs\",\n \"parseEnv\",\n \"promisify\",\n \"stripVTControlCharacters\",\n \"styleText\",\n \"TextDecoder\",\n \"TextEncoder\",\n \"toUSVString\",\n \"transferableAbortController\",\n \"transferableAbortSignal\",\n \"aborted\",\n \"types\",\n ],\n },\n },\n});\n"],"mappings":"AAEA,SAAS,aAAa,QAAQ,sBAAsB;;AAEpD;;AAGA,OAAO,MAAM,IAAI,GAAG,aAAa,CAAC;EAChC,IAAI,EAAE,WAAW;EACjB,OAAO,EAAE,QAAQ;EACjB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE;IACV,GAAG,EAAE;MACH,OAAO,EAAE,MAAM;MACf,KAAK,EAAE,CACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,MAAM,EACN,WAAW,EACX,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,EACT,KAAK,EACL,kBAAkB,EAClB,OAAO;IAEX;EACF;AACF,CAAC,CAAC;AAEF,OAAO,MAAM,EAAE,GAAG,aAAa,CAAC;EAC9B,IAAI,EAAE,SAAS;EACf,OAAO,EAAE,QAAQ;EACjB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE;IACV,GAAG,EAAE;MACH,OAAO,EAAE,IAAI;MACb,KAAK,EAAE,CACL,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,QAAQ,EAC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N,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAW;IAEf;EACF;AACF,CAAC,CAAC;AAEF,OAAO,MAAM,IAAI,GAAG,aAAa,CAAC;EAChC,IAAI,EAAE,WAAW;EACjB,OAAO,EAAE,QAAQ;EACjB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE;IACV,GAAG,EAAE;MACH,OAAO,EAAE,MAAM;MACf,KAAK,EAAE,CACL,aAAa,EACb,UAAU,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAW,EACX,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,OAAO;IAEX;EACF;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ArrayExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"ArrayExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ArrayExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,YAuB1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ArrayExpression.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport { childrenArray, For, Indent, Show } from \"@alloy-js/core\";\n\nimport { ValueExpression } from \"./ValueExpression.js\";\n\nexport interface ArrayExpressionProps {\n children?: Children;\n jsValue?: unknown[];\n}\n\nexport function ArrayExpression(props: ArrayExpressionProps) {\n const hasVisibleChildren =\n childrenArray(() => props.children).filter((c) => Boolean(c)).length > 0;\n\n return (\n <group>\n [\n <Indent softline>\n <For each={props.jsValue ?? []} comma line>\n {(value) => <ValueExpression jsValue={value} />}\n </For>\n <Show when={hasVisibleChildren}>\n {props.jsValue && props.jsValue.length > 0 && (\n <>\n ,<br />\n </>\n )}\n {props.children}\n </Show>\n </Indent>\n <sbr />]\n </group>\n );\n}\n"],"mappings":";AACA,SAAS,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,QAAQ,gBAAgB;AAEjE,SAAS,eAAe,QAAQ,sBAAsB;AAOtD,OAAO,SAAS,eAAe,CAAC,KAA2B,EAAE;EAC3D,MAAM,kBAAkB,GACtB,aAAa,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAE,CAAC,IAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;EAE1E;IAAA;MAAA,+BAGK,MAAM;QAAC,QAAQ;QAAA;UAAA,0BACb,GAAG;YAAA,IAAC,IAAI;cAAA,OAAE,KAAK,CAAC,OAAO,IAAI,EAAE;YAAA;YAAE,KAAK;YAAC,IAAI;YAAA,UACtC,KAAK,sBAAM,eAAe;cAAC,OAAO,EAAE;YAAK;UAAI,sBAEhD,IAAI;YAAC,IAAI,EAAE,kBAAkB;YAAA;cAAA,qBAC3B,qBAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,0CAIzC,gBACA,KAAK,CAAC,QAAQ;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA;AAMzB","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Children } from "@alloy-js/core";
|
|
2
|
-
import { CallSignatureProps } from "./CallSignature.jsx";
|
|
2
|
+
import type { CallSignatureProps } from "./CallSignature.jsx";
|
|
3
3
|
import { FunctionBody, FunctionParameters, TypeParameters } from "./FunctionBase.jsx";
|
|
4
4
|
export interface ArrowFunctionProps extends CallSignatureProps {
|
|
5
5
|
async?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowFunction.d.ts","sourceRoot":"","sources":["../../../src/components/ArrowFunction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrowFunction.d.ts","sourceRoot":"","sources":["../../../src/components/ArrowFunction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAElB,cAAc,EACf,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,YA+BtD;yBA/Be,aAAa;;aAkCF,kBAAkB;aACxB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ArrowFunction.tsx"],"sourcesContent":["import {\n childrenArray,\n findKeyedChild,\n findUnkeyedChildren,\n type Children,\n} from \"@alloy-js/core\";\n\nimport { getCallSignatureProps } from \"../utils.js\";\nimport type { CallSignatureProps } from \"./CallSignature.jsx\";\nimport { CallSignature } from \"./CallSignature.jsx\";\nimport {\n FunctionBody,\n FunctionParameters,\n getReturnType,\n TypeParameters,\n} from \"./FunctionBase.jsx\";\nimport { LexicalScope } from \"./LexicalScope.jsx\";\n\nexport interface ArrowFunctionProps extends CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * A TypeScript arrow function expression.\n *\n * @example\n * ```tsx\n * <FunctionExpression async parameters={[{ name: \"a\", type: \"number\" }, { name: \"b\", type: \"number\" }]}>\n * return a + b;\n * <FunctionExpression>\n * ```\n * renders to\n * ```ts\n * async (a, b) => { return a + b; }\n * ```\n *\n * @remarks\n *\n * Providing parameters and type parameters can be accomplished in one of three\n * ways:\n *\n * 1. As an array of {@link ParameterDescriptor}s or\n * {@link TypeParameterDescriptor}s.\n * 2. As raw content via the `parametersChildren` or `typeParametersChildren`\n * props.\n * 3. As a child of this component via the\n * {@link (ArrowFunction:namespace).Parameters} or\n * {@link (ArrowFunction:namespace).TypeParameters} components.\n */\nexport function ArrowFunction(props: ArrowFunctionProps) {\n const children = childrenArray(() => props.children);\n const typeParametersChildren =\n findKeyedChild(children, TypeParameters.tag) ?? undefined;\n const parametersChildren =\n findKeyedChild(children, FunctionParameters.tag) ?? undefined;\n const bodyChildren = findKeyedChild(children, FunctionBody.tag) ?? undefined;\n const filteredChildren = findUnkeyedChildren(children);\n const returnType = getReturnType(props.returnType, { async: props.async });\n\n const sBody = bodyChildren ?? (\n <ArrowFunction.Body>{filteredChildren}</ArrowFunction.Body>\n );\n\n const asyncKwd = props.async ? \"async \" : \"\";\n\n const callSignatureProps = getCallSignatureProps(props, {\n parametersChildren,\n typeParametersChildren,\n });\n\n return (\n <>\n {asyncKwd}\n <LexicalScope>\n <CallSignature {...callSignatureProps} returnType={returnType} />\n {\" => \"}\n {sBody}\n </LexicalScope>\n </>\n );\n}\n\nArrowFunction.TypeParameters = TypeParameters;\nArrowFunction.Parameters = FunctionParameters;\nArrowFunction.Body = FunctionBody;\n"],"mappings":";AAAA,SACE,aAAa,EACb,cAAc,EACd,mBAAmB,QAEd,gBAAgB;AAEvB,SAAS,qBAAqB,QAAQ,aAAa;AAEnD,SAAS,aAAa;AACtB,SACE,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,cAAc;AAEhB,SAAS,YAAY;AAOrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,aAAa,CAAC,KAAyB,EAAE;EACvD,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;EACpD,MAAM,sBAAsB,GAC1B,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,IAAI,SAAS;EAC3D,MAAM,kBAAkB,GACtB,cAAc,CAAC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,CAAC,IAAI,SAAS;EAC/D,MAAM,YAAY,GAAG,cAAc,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,SAAS;EAC5E,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,QAAQ,CAAC;EACtD,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;EAAM,CAAC,CAAC;EAE1E,MAAM,KAAK,GAAG,YAAY,sBACvB,aAAa,CAAC,IAAI;IAAA,UAAE;EAAgB,EACtC;EAED,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,EAAE;EAE5C,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,KAAK,EAAE;IACtD,kBAAkB;IAClB;EACF,CAAC,CAAC;EAEF,QAEK,QAAQ,oBACR,YAAY;IAAA;MAAA,0BACV,aAAa,eAAK,kBAAkB;QAAE,UAAU,EAAE;MAAU,KAC5D,MAAM,EACN,KAAK;IAAA;EAAA;AAId;AAEA,aAAa,CAAC,cAAc,GAAG,cAAc;AAC7C,aAAa,CAAC,UAAU,GAAG,kBAAkB;AAC7C,aAAa,CAAC,IAAI,GAAG,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/BarrelFile.tsx"],"sourcesContent":["import { For, memo, SourceDirectoryContext, useContext } from \"@alloy-js/core\";\nimport { basename } from \"pathe\";\n\nimport { getSourceDirectoryData } from \"../source-directory-data.js\";\nimport type { TSModuleScope } from \"../symbols/index.js\";\nimport { ExportStatement } from \"./ExportStatement.js\";\nimport { SourceFile } from \"./SourceFile.js\";\n\nexport interface BarrelFileProps {\n /**\n * The name of the source file\n */\n path?: string;\n\n /**\n * Whether the source file is exported out of the package. When true, this\n * source file with its source file relative to the project root. Otherwise,\n * it will be exported with the specified path.\n */\n export?: boolean | string;\n}\n\n/**\n * Creates a source file which re-exports the exports in other files and nested\n * barrel files in the source directory its placed in.\n *\n * @remarks\n *\n * This component must be placed directly inside a {@link @alloy-js/core#SourceDirectory}\n * component. It will only discover nested barrel files directly within nested\n * source directories.\n *\n * @example\n *\n * Creating a barrel file which exports the two other source files in the same directory\n *\n * ```tsx\n * <Output>\n * <SourceDirectory path=\"src\">\n * <SourceFile path=\"one.ts\" />\n * <SourceFile path=\"two.ts\" />\n * <BarrelFile />\n * </SourceDirectory>\n * </Output>\n * ```\n *\n * The barrel file will contain the following contents:\n *\n * ```ts\n * export * from \"./one.js\";\n * export * from \"./two.js\";\n * ```\n *\n *\n * @see {@link @alloy-js/core#SourceDirectory}\n * @see {@link SourceFile}\n */\nexport function BarrelFile(props: BarrelFileProps) {\n const path = props.path ?? \"index.ts\";\n const directory = useContext(SourceDirectoryContext)!;\n const sdData = getSourceDirectoryData(directory);\n\n const exports = memo(() => {\n const subdirs = directory.contents.filter(\n (c) => !(c as any).filetype,\n ) as SourceDirectoryContext[];\n\n const nestedBarrels: TSModuleScope[] = [];\n for (const subdir of subdirs) {\n const nestedSdData = getSourceDirectoryData(subdir);\n const nestedBarrel = Array.from(nestedSdData.modules).find(\n (m) => basename(m.name) === \"index.ts\",\n );\n if (nestedBarrel) {\n nestedBarrels.push(nestedBarrel);\n }\n }\n\n const sourceFiles = Array.from(sdData.modules).filter(\n (m) => basename(m.name) !== \"index.ts\",\n );\n\n return [...sourceFiles, ...nestedBarrels];\n });\n\n return (\n <SourceFile path={path} export={props.export}>\n <For each={exports}>{(mod) => <ExportStatement star from={mod} />}</For>\n </SourceFile>\n );\n}\n"],"mappings":";AAAA,SAAS,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAAE,UAAU,QAAQ,gBAAgB;AAC9E,SAAS,QAAQ,QAAQ,OAAO;AAEhC,SAAS,sBAAsB,QAAQ,6BAA6B;AAEpE,SAAS,eAAe,QAAQ,sBAAsB;AACtD,SAAS,UAAU,QAAQ,iBAAiB;AAgB5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAE;EACjD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,UAAU;EACrC,MAAM,SAAS,GAAG,UAAU,CAAC,sBAAsB,CAAE;EACrD,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC;EAEhD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM;IACzB,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,CACtC,CAAC,IAAK,CAAE,CAAC,CAAS,QACrB,CAA6B;IAE7B,MAAM,aAA8B,GAAG,EAAE;IACzC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;MAC5B,MAAM,YAAY,GAAG,sBAAsB,CAAC,MAAM,CAAC;MACnD,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,CACvD,CAAC,IAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,UAC9B,CAAC;MACD,IAAI,YAAY,EAAE;QAChB,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC;MAClC;IACF;IAEA,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAClD,CAAC,IAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,UAC9B,CAAC;IAED,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,aAAa,CAAC;EAC3C,CAAC,CAAC;EAEF,yBACG,UAAU;IAAC,IAAI,EAAE,IAAI;IAAA;MAAA,OAAU,KAAK,CAAC,MAAM;IAAA;IAAA;MAAA,yBACzC,GAAG;QAAC,IAAI,EAAE,OAAO;QAAA,UAAI,GAAG,sBAAM,eAAe;UAAC,IAAI;UAAC,IAAI,EAAE;QAAG;MAAI;IAAA;EAAA;AAGvE","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockProps, ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
|
|
1
|
+
import type { BlockProps, ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
|
|
2
2
|
export interface BlockScopePropsWithScopeValue extends ScopePropsWithValue, BlockProps {
|
|
3
3
|
}
|
|
4
4
|
export interface BlockScopePropsWithScopeInfo extends ScopePropsWithInfo, BlockProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockScope.d.ts","sourceRoot":"","sources":["../../../src/components/BlockScope.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BlockScope.d.ts","sourceRoot":"","sources":["../../../src/components/BlockScope.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAKxB,MAAM,WAAW,6BACf,SAAQ,mBAAmB,EAAE,UAAU;CAAG;AAC5C,MAAM,WAAW,4BACf,SAAQ,kBAAkB,EAAE,UAAU;CAAG;AAE3C,MAAM,MAAM,eAAe,GACvB,6BAA6B,GAC7B,4BAA4B,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qCAMhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/BlockScope.tsx"],"sourcesContent":["import type {\n BlockProps,\n ScopePropsWithInfo,\n ScopePropsWithValue,\n} from \"@alloy-js/core\";\nimport { Block } from \"@alloy-js/core\";\n\nimport { LexicalScope } from \"./LexicalScope.jsx\";\n\nexport interface BlockScopePropsWithScopeValue\n extends ScopePropsWithValue, BlockProps {}\nexport interface BlockScopePropsWithScopeInfo\n extends ScopePropsWithInfo, BlockProps {}\n\nexport type BlockScopeProps =\n | BlockScopePropsWithScopeValue\n | BlockScopePropsWithScopeInfo;\n\n/**\n * Create a TypeScript block which includes a scope for any nested declarations.\n * Can either provide the scope directly via the `value` prop, or else provide\n * information about the scope.\n */\nexport function BlockScope(props: BlockScopeProps) {\n return (\n <LexicalScope {...props}>\n <Block {...props}>{props.children}</Block>\n </LexicalScope>\n );\n}\n"],"mappings":";AAKA,SAAS,KAAK,QAAQ,gBAAgB;AAEtC,SAAS,YAAY;AAWrB;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAE;EACjD,yBACG,YAAY,eAAK,KAAK;IAAA;MAAA,yBACpB,KAAK,eAAK,KAAK;QAAA;UAAA,OAAG,KAAK,CAAC,QAAQ;QAAA;MAAA;IAAA;EAAA;AAGvC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Children } from "@alloy-js/core";
|
|
2
|
-
import { ParameterDescriptor, TypeParameterDescriptor } from "../parameter-descriptor.js";
|
|
2
|
+
import type { ParameterDescriptor, TypeParameterDescriptor } from "../parameter-descriptor.js";
|
|
3
3
|
export interface CallSignatureProps {
|
|
4
4
|
/**
|
|
5
5
|
* The parameters to the function. Can be an array of strings for parameters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallSignature.d.ts","sourceRoot":"","sources":["../../../src/components/CallSignature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"CallSignature.d.ts","sourceRoot":"","sources":["../../../src/components/CallSignature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAIpC,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IAE9C;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,CAAC;IAEtD;;OAEG;IACH,sBAAsB,CAAC,EAAE,QAAQ,CAAC;IAElC;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB;AACD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,YAwBtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/CallSignature.tsx"],"sourcesContent":["import { type Children } from \"@alloy-js/core\";\n\nimport type {\n ParameterDescriptor,\n TypeParameterDescriptor,\n} from \"../parameter-descriptor.js\";\nimport { FunctionDeclaration } from \"./FunctionDeclaration.jsx\";\nimport { TypeRefContext } from \"./TypeRefContext.jsx\";\n\nexport interface CallSignatureProps {\n /**\n * The parameters to the function. Can be an array of strings for parameters\n * which don't have a type or a default value. Otherwise, it's an array of\n * {@link ParameterDescriptor}s.\n */\n parameters?: ParameterDescriptor[] | string[];\n\n /**\n * Raw content to be used as the parameter list.\n */\n parametersChildren?: Children;\n\n /**\n * The type parameters for the function. Can be an array of strings for\n * type parameters which don't have any constraints or a default type, otherwise\n * it's an array of {@link TypeParameterDescriptor}s.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n\n /**\n * Raw content to be used as the type parameter list.\n */\n typeParametersChildren?: Children;\n\n /**\n * The return type of the function.\n */\n returnType?: Children;\n}\n/**\n * A TypeScript call signature, e.g. the part after the `function` keyword in an\n * anonymous function expression, or a call signature in an interface.\n *\n * Any parameters or type parameters declared in this signature will be placed\n * in the current scope. This component does not make a scope to hold its\n * parameters.\n */\nexport function CallSignature(props: CallSignatureProps) {\n const sTypeParameters = props.typeParametersChildren ? (\n <>\n {\"<\"}\n {props.typeParametersChildren}\n {\">\"}\n </>\n ) : (\n <FunctionDeclaration.TypeParameters parameters={props.typeParameters} />\n );\n\n const sParams = props.parametersChildren ?? (\n <FunctionDeclaration.Parameters parameters={props.parameters} />\n );\n\n const sReturnType = props.returnType ? (\n <TypeRefContext>: {props.returnType}</TypeRefContext>\n ) : undefined;\n\n return (\n <>\n {sTypeParameters}({sParams}){sReturnType}\n </>\n );\n}\n"],"mappings":";AAAA,OAA8B,gBAAgB;AAM9C,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AAgCvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,aAAa,CAAC,KAAyB,EAAE;EACvD,MAAM,eAAe,GAAG,KAAK,CAAC,sBAAsB,IAE/C,GAAG,eACH,KAAK,CAAC,sBAAsB,GAC5B,GAAG,sBAGL,mBAAmB,CAAC,cAAc;IAAA,IAAC,UAAU;MAAA,OAAE,KAAK,CAAC,cAAc;IAAA;EAAA,EACrE;EAED,MAAM,OAAO,GAAG,KAAK,CAAC,kBAAkB,sBACrC,mBAAmB,CAAC,UAAU;IAAA,IAAC,UAAU;MAAA,OAAE,KAAK,CAAC,UAAU;IAAA;EAAA,EAC7D;EAED,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,qBACjC,cAAc;IAAA;MAAA,2BAAI,KAAK,CAAC,UAAU;IAAA;EAAA,KACjC,SAAS;EAEb,QAEK,eAAe,OAAG,OAAO,OAAG,WAAW;AAG9C","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
2
|
-
import { CallSignatureProps } from "./CallSignature.jsx";
|
|
3
|
-
import { CommonDeclarationProps } from "./Declaration.jsx";
|
|
1
|
+
import type { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
2
|
+
import type { CallSignatureProps } from "./CallSignature.jsx";
|
|
3
|
+
import type { CommonDeclarationProps } from "./Declaration.jsx";
|
|
4
4
|
export interface ClassDeclarationProps extends CommonDeclarationProps {
|
|
5
5
|
extends?: Children;
|
|
6
6
|
implements?: Children[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/ClassDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ClassDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/ClassDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAkBhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAShE,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAmC5D;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YA2BlD;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAiBhD;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,EAAE,kBAAkB;IAC5E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAwBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ClassDeclaration.tsx"],"sourcesContent":["import type { Children, Namekey, Refkey } from \"@alloy-js/core\";\nimport {\n Block,\n For,\n MemberDeclaration,\n Name,\n Prose,\n Show,\n splitProps,\n} from \"@alloy-js/core\";\n\nimport { useTSNamePolicy } from \"../name-policy.js\";\nimport {\n createMemberSymbol,\n createTypeAndValueSymbol,\n} from \"../symbols/index.js\";\nimport { TSSymbolFlags } from \"../symbols/ts-output-symbol.js\";\nimport { getCallSignatureProps } from \"../utils.js\";\nimport type { CallSignatureProps } from \"./CallSignature.jsx\";\nimport { CallSignature } from \"./CallSignature.jsx\";\nimport type { CommonDeclarationProps } from \"./Declaration.jsx\";\nimport { Declaration } from \"./Declaration.jsx\";\nimport { JSDoc } from \"./JSDoc.jsx\";\nimport { JSDocParams } from \"./JSDocParam.jsx\";\nimport { LexicalScope } from \"./LexicalScope.jsx\";\nimport { MemberScope } from \"./MemberScope.jsx\";\nimport { PropertyName } from \"./PropertyName.jsx\";\nimport { TypeRefContext } from \"./TypeRefContext.jsx\";\n\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n extends?: Children;\n implements?: Children[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @remarks\n *\n * @example\n *\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {(implement) => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\"),\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <JSDoc children={props.doc} />\n <hbr />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n class <Name />\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n}\n\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\"),\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <JSDoc children={props.doc} />\n <hbr />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\nexport interface ClassFieldProps extends ClassMemberProps {\n type?: Children;\n optional?: boolean;\n children?: Children;\n}\n\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <JSDoc>\n {props.doc && <Prose children={props.doc} />}\n {Array.isArray(rest.parameters) && (\n <JSDocParams parameters={rest.parameters} />\n )}\n </JSDoc>\n <hbr />\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";AACA,SACE,KAAK,EACL,GAAG,EACH,iBAAiB,EACjB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,UAAU,QACL,gBAAgB;AAEvB,SAAS,eAAe,QAAQ,mBAAmB;AACnD,SACE,kBAAkB,EAClB,wBAAwB,QACnB,qBAAqB;AAC5B,SAAS,aAAa,QAAQ,gCAAgC;AAC9D,SAAS,qBAAqB,QAAQ,aAAa;AAEnD,SAAS,aAAa;AAEtB,SAAS,WAAW;AACpB,SAAS,KAAK;AACd,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,cAAc;AAOvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,gBAAgB,CAAC,KAA4B,EAAE;EAC7D,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,+BAAgB,KAAK,CAAC,OAAO,EAAI;EAClE,MAAM,cAAc,G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CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;EAE5C,0BAEK,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;IAAA;IAAA;MAAA,0BAC3B,KAAK;QAAA;UAAA,qBACH,oBAAK,CAAC,GAAG,yBAAK,KAAK;YAAA,IAAC,QAAQ;cAAA,OAAE,KAAK,CAAC,GAAG;YAAA;UAAA,EAAI,gBAC3C,oBAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,yBAC5B,WAAW;YAAA,IAAC,UAAU;cAAA,OAAE,IAAI,CAAC,UAAU;YAAA;UAAA,EACzC;QAAA;MAAA;IAAA;EAAA,sBAIJ,WAAW,eAAK,IAAI;IAAA;MAAA,qBAClB,KAAK,CAAC,KAAK,IAAI,QAAQ,qBACvB,YAAY,yBACZ,YAAY;QAAA;UAAA,0BACV,aAAa,EAAK,SAAS,0BAAM,KAAK;YAAA;cAAA,OAAE,KAAK,CAAC,QAAQ;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA;AAKjE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommaList.d.ts","sourceRoot":"","sources":["../../../src/components/CommaList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"CommaList.d.ts","sourceRoot":"","sources":["../../../src/components/CommaList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,YAU9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/CommaList.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport { List, splitProps } from \"@alloy-js/core\";\n\nexport interface CommaListProps {\n children: Children;\n hardline?: boolean;\n softline?: boolean;\n}\n\n/**\n * A comma-separated list of items (e.g. arguments to a function call,\n * parameters, etc).\n */\nexport function CommaList(props: CommaListProps) {\n return (\n <List\n comma\n {...splitProps(props, [\"hardline\", \"softline\"])}\n enderPunctuation\n >\n {props.children}\n </List>\n );\n}\n"],"mappings":";AACA,SAAS,IAAI,EAAE,UAAU,QAAQ,gBAAgB;AAQjD;AACA;AACA;AACA;AACA,OAAO,SAAS,SAAS,CAAC,KAAqB,EAAE;EAC/C,yBACG,IAAI;IACH,KAAK;EAAA,SACD,UAAU,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC/C,gBAAgB;IAAA;MAAA,OAEf,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGrB","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
2
|
-
import { TypeScriptElements } from "../name-policy.js";
|
|
3
|
-
import { TSOutputSymbol } from "../symbols/index.js";
|
|
1
|
+
import type { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
2
|
+
import type { TypeScriptElements } from "../name-policy.js";
|
|
3
|
+
import type { TSOutputSymbol } from "../symbols/index.js";
|
|
4
4
|
export interface DeclarationPropsBase {
|
|
5
5
|
children?: Children;
|
|
6
6
|
/**
|