@alloy-js/typescript 0.25.0-dev.2 → 0.25.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 +4 -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 +17 -17
- 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.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.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.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.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.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 +5 -11
- 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 +1 -1
- package/test/name-conflict.test.tsx +4 -3
- 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":["../../../src/components/PackageJson.tsx"],"sourcesContent":["import { memo, SourceFile, useContext } from \"@alloy-js/core\";\n\nimport { PackageMetadataContext } from \"../context/package-metadata.js\";\nimport { modulePath } from \"../utils.js\";\nimport { usePackage } from \"./PackageDirectory.js\";\n\nexport interface PackageJsonFileProps {\n /** The name of the package */\n name: string;\n\n /** The version of the package */\n version: string;\n\n /** The description of the package */\n description?: string;\n\n /** The license of the package */\n license?: string;\n\n /** The author of the package */\n author?: string;\n\n /** The homepage of the package */\n homepage?: string;\n\n /** The repository of the package */\n repository?: string | { type: string; url: string };\n\n /** The keywords of the package */\n keywords?: string[];\n\n /** Whether this is a commonjs or module. Defaults to module. */\n type?: \"module\" | \"commonjs\";\n\n /**\n * The hard-coded dependencies of the package. References to external packages\n * will add to the dependency list automatically. Only list dependencies here\n * that are not referenced via refkey.\n */\n dependencies?: Record<string, string>;\n\n /** The hard-coded exports of the package. */\n exports?: PackageExports | ExportPath;\n\n /** The dev dependencies of the package. */\n devDependencies?: Record<string, string>;\n\n /** The peer dependencies of the package. */\n peerDependencies?: Record<string, string>;\n\n /** The scripts entries of the package. */\n scripts?: Record<string, string>;\n}\n\nexport interface ExportConditions {\n [condition: string]: string | ExportConditions;\n}\n\nexport type ExportPath = string | ExportConditions;\n\nexport interface PackageExports {\n [key: string]: ExportPath;\n}\n\n/**\n * A file containing a package.json that defines a package. When placed inside a\n * {@link PackageDirectory}, it will contain dependencies and exports for\n * symbols defined inside the package. Additional dependencies and exports can\n * be provided.\n *\n * @example\n * ```tsx\n * <PackageJsonFile name=\"my-package\" version=\"1.0.0\" />\n * ```\n */\nexport function PackageJsonFile(props: PackageJsonFileProps) {\n const pkg = usePackage();\n const pkgMeta = useContext(PackageMetadataContext);\n\n const dependencies = memo(() => {\n const kinds = {\n dependencies: props.dependencies,\n devDependencies: props.devDependencies,\n peerDependencies: props.peerDependencies,\n };\n\n if (pkg) {\n for (const dependency of pkg.scope.dependencies) {\n const kind = pkgMeta?.dependencyType.get(dependency) ?? \"dependencies\";\n const versionSpecifier =\n pkgMeta?.versionSpecifiers.get(dependency) ?? dependency.version;\n\n kinds[kind] ??= {};\n kinds[kind][dependency.name] = versionSpecifier;\n }\n }\n\n return kinds;\n });\n\n const jsonContent = memo(() => {\n const deps = dependencies();\n\n const pkgJson = {\n name: props.name,\n version: props.version,\n author: props.author,\n description: props.description,\n license: props.license,\n homepage: props.homepage,\n type: props.type ?? \"module\",\n dependencies: deps.dependencies,\n devDependencies: deps.devDependencies,\n peerDependencies: deps.peerDependencies,\n scripts: props.scripts,\n exports: undefined as any,\n };\n\n if (typeof props.exports === \"string\") {\n pkgJson.exports = props.exports;\n } else {\n const exportsEntries: [string, ExportPath][] = [];\n for (const entry of Object.entries(props.exports ?? {})) {\n exportsEntries.push(entry);\n }\n\n if (pkg) {\n for (const [publicPath, module] of pkg.scope.exportedSymbols) {\n exportsEntries.push([\n publicPath,\n modulePath(pkg.outFileMapper.value(module.name)),\n ]);\n }\n }\n\n pkgJson.exports =\n exportsEntries.length === 0\n ? undefined\n : Object.fromEntries(exportsEntries);\n }\n\n return JSON.stringify(pkgJson, null, 2);\n });\n\n return (\n <SourceFile path=\"package.json\" filetype=\"json\">\n {jsonContent}\n </SourceFile>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,EAAE,UAAU,EAAE,UAAU,QAAQ,gBAAgB;AAE7D,SAAS,sBAAsB,QAAQ,gCAAgC;AACvE,SAAS,UAAU,QAAQ,aAAa;AACxC,SAAS,UAAU,QAAQ,uBAAuB;AA4DlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,eAAe,CAAC,KAA2B,EAAE;EAC3D,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC;EACxB,MAAM,OAAO,GAAG,UAAU,CAAC,sBAAsB,CAAC;EAElD,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM;IAC9B,MAAM,KAAK,GAAG;MACZ,YAAY,EAAE,KAAK,CAAC,YAAY;MAChC,eAAe,EAAE,KAAK,CAAC,eAAe;MACtC,gBAAgB,EAAE,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,GAAG,EAAE;MACP,KAAK,MAAM,UAAU,IAAI,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE;QAC/C,MAAM,IAAI,GAAG,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,cAAc;QACtE,MAAM,gBAAgB,GACpB,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,OAAO;QAElE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB;MACjD;IACF;IAEA,OAAO,KAAK;EACd,CAAC,CAAC;EAEF,MAAM,WAAW,GAAG,IAAI,CAAC,MAA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,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;EACzC,CAAC,CAAC;EAEF,yBACG,UAAU;IAAC,IAAI;IAAgB,QAAQ;IAAA,UACrC;EAAW;AAGlB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/PropertyName.tsx"],"sourcesContent":["import { MemberDeclarationContext, memo, useContext } from \"@alloy-js/core\";\n\nimport type { TSOutputSymbol } from \"../symbols/ts-output-symbol.js\";\nimport { isValidJSIdentifier } from \"../utils.js\";\n\nexport interface PropertyNameProps {\n /**\n * The name of the property.\n */\n name?: string;\n\n /**\n * Whether the property is a private property. If `true`, the property will be\n * prefixed with `#`.\n */\n private?: boolean;\n}\n\n/**\n * A TypeScript property name for an interface, class, or object member. If the\n * name is not a valid JavaScript identifier, it will be quoted. If a `name` prop\n * is provided, it will be used as the property name. Otherwise, the name will be\n * taken from the {@link (MemberDeclarationContext:variable)}.\n */\nexport function PropertyName(props: PropertyNameProps) {\n if (props.name) {\n return memo(() => {\n if (props.private) {\n return \"#\" + props.name;\n }\n return quoteIfNeeded(props.name!);\n });\n } else {\n const declSymbol = useContext(MemberDeclarationContext) as TSOutputSymbol;\n if (!declSymbol) {\n return \"(no member declaration context)\";\n }\n\n if (declSymbol.isPrivateMemberSymbol) {\n return <>#{declSymbol.name}</>;\n } else {\n return <>{quoteIfNeeded(declSymbol.name)}</>;\n }\n }\n}\n\nfunction quoteIfNeeded(name: string) {\n if (isValidJSIdentifier(name)) {\n return name;\n } else {\n return `\"${name.replace(/\"/g, '\\\\\"')}\"`;\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB,EAAE,IAAI,EAAE,UAAU,QAAQ,gBAAgB;AAG3E,SAAS,mBAAmB,QAAQ,aAAa;AAejD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,YAAY,CAAC,KAAwB,EAAE;EACrD,IAAI,KAAK,CAAC,IAAI,EAAE;IACd,OAAO,IAAI,CAAC,MAAM;MAChB,IAAI,KAAK,CAAC,OAAO,EAAE;QACjB,OAAO,GAAG,GAAG,KAAK,CAAC,IAAI;MACzB;MACA,OAAO,aAAa,CAAC,KAAK,CAAC,IAAK,CAAC;IACnC,CAAC,CAAC;EACJ,CAAC,MAAM;IACL,MAAM,UAAU,GAAG,UAAU,CAAC,wBAAwB,CAAmB;IACzE,IAAI,CAAC,UAAU,EAAE;MACf,OAAO,iCAAiC;IAC1C;IAEA,IAAI,UAAU,CAAC,qBAAqB,EAAE;MACpC,0BAAW,UAAU,CAAC,IAAI;IAC5B,CAAC,MAAM;MACL,qBAAU,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC;IAC1C;EACF;AACF;AAEA,SAAS,aAAa,CAAC,IAAY,EAAE;EACnC,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE;IAC7B,OAAO,IAAI;EACb,CAAC,MAAM;IACL,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG;EACzC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,cAAc,qCAOzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/Reference.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\nimport { computed, emitSymbol } from \"@alloy-js/core\";\n\nimport { isTypeRefContext } from \"../context/type-ref-context.js\";\nimport { ref } from \"../symbols/index.js\";\n\nexport interface ReferenceProps {\n refkey: Refkey;\n\n /**\n * Whether this is a reference to a type.\n *\n * @remarks\n * This affect things like import where `type` keyword might be used.\n */\n type?: boolean;\n}\n\nexport function Reference({ refkey, type }: ReferenceProps) {\n const inTypeRef = isTypeRefContext();\n const reference = ref(refkey, { type: type ?? inTypeRef });\n const symbolRef = computed(() => reference()[1]);\n\n emitSymbol(symbolRef);\n return <>{reference()[0]}</>;\n}\n"],"mappings":";AACA,SAAS,QAAQ,EAAE,UAAU,QAAQ,gBAAgB;AAErD,SAAS,gBAAgB,QAAQ,gCAAgC;AACjE,SAAS,GAAG,QAAQ,qBAAqB;AAczC,OAAO,SAAS,SAAS,CAAC;EAAE,MAAM;EAAE;AAAqB,CAAC,EAAE;EAC1D,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC;EACpC,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,IAAI,IAAI;EAAU,CAAC,CAAC;EAC1D,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EAEhD,UAAU,CAAC,SAAS,CAAC;EACrB,qBAAU,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/SingleLineCommentBlock.tsx"],"sourcesContent":["import { Prose, type Children } from \"@alloy-js/core\";\n\nexport interface SingleLineCommentBlockProps {\n children: Children;\n}\n\n/**\n * A single line comment block. The children are rendered as a prose element, which means that they\n * are broken into multiple lines\n */\nexport function SingleLineCommentBlock(props: SingleLineCommentBlockProps) {\n return (\n <>\n //{\" \"}\n <align string=\"// \">\n <Prose>{props.children}</Prose>\n </align>\n </>\n );\n}\n"],"mappings":";AAAA,SAAS,KAAK,QAAuB,gBAAgB;AAMrD;AACA;AACA;AACA;AACA,OAAO,SAAS,sBAAsB,CAAC,KAAkC,EAAE;EACzE,cAEO,GAAG;IACC,MAAM;IAAA;MAAA,yBACV,KAAK;QAAA;UAAA,OAAE,KAAK,CAAC,QAAQ;QAAA;MAAA;IAAA;EAAA;AAI9B","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ComponentContext
|
|
1
|
+
import type { ComponentContext } from "@alloy-js/core";
|
|
2
|
+
import { type Children } from "@alloy-js/core";
|
|
2
3
|
import { TSModuleScope } from "../symbols/index.js";
|
|
3
4
|
export interface SourceFileContext {
|
|
4
5
|
scope: TSModuleScope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceFile.d.ts","sourceRoot":"","sources":["../../../src/components/SourceFile.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SourceFile.d.ts","sourceRoot":"","sources":["../../../src/components/SourceFile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EASL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB,CACX,CAAC;AAExD,wBAAgB,aAAa,sBAE5B;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAqDhD;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SourceFile","
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/SourceFile.tsx"],"sourcesContent":["import type { ComponentContext } from \"@alloy-js/core\";\nimport {\n SourceFile as CoreSourceFile,\n createNamedContext,\n createScope,\n Scope,\n Show,\n SourceDirectoryContext,\n useContext,\n useScope,\n type Children,\n} from \"@alloy-js/core\";\nimport { join } from \"pathe\";\n\nimport { getSourceDirectoryData } from \"../source-directory-data.js\";\nimport { TSModuleScope } from \"../symbols/index.js\";\nimport { ImportStatements } from \"./ImportStatement.js\";\nimport { PackageContext } from \"./PackageDirectory.js\";\nimport { Reference } from \"./Reference.js\";\nimport { SingleLineCommentBlock } from \"./SingleLineCommentBlock.jsx\";\nexport interface SourceFileContext {\n scope: TSModuleScope;\n}\n\nexport const SourceFileContext: ComponentContext<SourceFileContext> =\n createNamedContext(\"@alloy-js/typescript SourceFile\");\n\nexport function useSourceFile() {\n return useContext(SourceFileContext)!;\n}\nexport interface SourceFileProps {\n path: string;\n children?: Children;\n header?: Children;\n headerComment?: string;\n export?: boolean | string;\n}\n\nexport function SourceFile(props: SourceFileProps) {\n const directoryContext = useContext(SourceDirectoryContext)!;\n const sdData = getSourceDirectoryData(directoryContext);\n const currentDir = directoryContext.path;\n const path: string = join(currentDir, props.path);\n const parent = useScope();\n const scope = createScope(TSModuleScope, path, parent, {\n binder: parent?.binder,\n });\n sdData.modules.add(scope);\n const pkg = useContext(PackageContext);\n if (pkg) {\n pkg.scope.addModule(scope);\n }\n const sfContext: SourceFileContext = {\n scope,\n };\n\n if (props.export) {\n if (pkg) {\n if (typeof props.export === \"boolean\") {\n pkg.scope.addExport(path, scope);\n } else {\n pkg.scope.addExport(props.export, scope);\n }\n }\n }\n\n const header =\n props.header || props.headerComment ? (\n <SourceFileHeader\n header={props.header}\n headerComment={props.headerComment}\n />\n ) : undefined;\n\n return (\n <CoreSourceFile\n path={props.path}\n filetype=\"typescript\"\n reference={Reference}\n header={header}\n >\n <Show when={scope.importedModules.size > 0}>\n <ImportStatements records={scope.importedModules} />\n <hbr />\n <hbr />\n </Show>\n <SourceFileContext.Provider value={sfContext}>\n <Scope value={scope}>{props.children}</Scope>\n </SourceFileContext.Provider>\n </CoreSourceFile>\n );\n}\n\nexport interface SourceFileHeaderProps {\n header?: Children;\n headerComment?: string;\n}\n\nfunction SourceFileHeader(props: SourceFileHeaderProps) {\n return (\n <>\n <Show when={props.headerComment !== undefined}>\n <SingleLineCommentBlock>{props.headerComment}</SingleLineCommentBlock>\n </Show>\n <Show when={props.header !== undefined}>{props.header}</Show>\n <hbr />\n </>\n );\n}\n"],"mappings":";AACA,SACE,UAAU,IAAI,cAAc,EAC5B,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,IAAI,EACJ,sBAAsB,EACtB,UAAU,EACV,QAAQ,QAEH,gBAAgB;AACvB,SAAS,IAAI,QAAQ,OAAO;AAE5B,SAAS,sBAAsB,QAAQ,6BAA6B;AACpE,SAAS,aAAa,QAAQ,qBAAqB;AACnD,SAAS,gBAAgB,QAAQ,sBAAsB;AACvD,SAAS,cAAc,QAAQ,uBAAuB;AACtD,SAAS,SAAS,QAAQ,gBAAgB;AAC1C,SAAS,sBAAsB;AAK/B,OAAO,MAAM,iBAAsD,GACjE,kBAAkB,CAAC,iCAAiC,CAAC;AAEvD,OAAO,SAAS,aAAa,GAAG;EAC9B,OAAO,UAAU,CAAC,iBAAiB,CAAC;AACtC;AASA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAE;EACjD,MAAM,gBAAgB,GAAG,UAAU,CAAC,sBAAsB,CAAE;EAC5D,MAAM,MAAM,GAAG,sBAAsB,CAAC,gBA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AG,CAAC;QAAA;QAAA;UAAA,0BACvC,gBAAgB;YAAA,IAAC,OAAO;cAAA,OAAE,KAAK,CAAC,eAAe;YAAA;UAAA;QAAA;MAAA,sBAIjD,iBAAiB,CAAC,QAAQ;QAAC,KAAK,EAAE,SAAS;QAAA;UAAA,yBACzC,KAAK;YAAC,KAAK,EAAE,KAAK;YAAA;cAAA,OAAG,KAAK,CAAC,QAAQ;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA;AAI5C;AAOA,SAAS,gBAAgB,CAAC,KAA4B,EAAE;EACtD,0BAEK,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,aAAa,KAAK,SAAS;IAAA;IAAA;MAAA,yBAC1C,sBAAsB;QAAA;UAAA,OAAE,KAAK,CAAC,aAAa;QAAA;MAAA;IAAA;EAAA,sBAE7C,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,MAAM,KAAK,SAAS;IAAA;IAAA;MAAA,OAAG,KAAK,CAAC,MAAM;IAAA;EAAA;AAI3D","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/SwitchStatement.tsx"],"sourcesContent":["import { Block, Indent, Match, Switch, type Children } from \"@alloy-js/core\";\n\nimport { BlockScope } from \"./BlockScope.jsx\";\nimport { ValueExpression } from \"./ValueExpression.jsx\";\n\nexport interface SwitchStatementProps {\n expression: Children;\n children: Children;\n}\n\n/**\n * A switch statement.\n */\nexport function SwitchStatement(props: SwitchStatementProps) {\n return (\n <>\n switch ({props.expression}) <Block>{props.children}</Block>\n </>\n );\n}\n\nexport interface CaseClausePropsBase {\n children: Children;\n block?: boolean;\n break?: boolean;\n}\n\nexport interface CaseClausePropsWithExpression extends CaseClausePropsBase {\n expression: Children;\n}\n\nexport interface CaseClausePropsWithValue extends CaseClausePropsBase {\n jsValue: unknown;\n}\n\nexport interface CaseClausePropsWithDefault extends CaseClausePropsBase {\n default: true;\n}\n\nexport type CaseClauseProps =\n | CaseClausePropsWithExpression\n | CaseClausePropsWithValue\n | CaseClausePropsWithDefault;\n\n/**\n * A case clause in a switch statement. Provide either an expression or a JS\n * value to compare to the switch expression. Can optionally be wrapped in a\n * block. Pass `break` to finish with a break statement.\n */\nexport function CaseClause(props: CaseClauseProps) {\n const Wrapper = props.block ? BlockScope : Indent;\n return (\n <>\n <Switch>\n <Match when={\"default\" in props && props.default}>default</Match>\n <Match else>\n case{\" \"}\n {\"expression\" in props ? (\n props.expression\n ) : (\n <ValueExpression\n jsValue={(props as CaseClausePropsWithValue).jsValue}\n />\n )}\n </Match>\n </Switch>\n {\": \"}\n <Wrapper>\n {props.children}\n {props.break && (\n <>\n <hbr />\n break;\n </>\n )}\n </Wrapper>\n </>\n );\n}\n"],"mappings":";AAAA,SAAS,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAuB,gBAAgB;AAE5E,SAAS,UAAU;AACnB,SAAS,eAAe;AAOxB;AACA;AACA;AACA,OAAO,SAAS,eAAe,CAAC,KAA2B,EAAE;EAC3D,iCAEa,KAAK,CAAC,UAAU,2BAAI,KAAK;IAAA;MAAA,OAAE,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGxD;AAyBA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAE;EACjD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,UAAU,GAAG,MAAM;EACjD,0BAEK,MAAM;IAAA;MAAA,0BACJ,KAAK;QAAA,IAAC,IAAI;UAAA,OAAE,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO;QAAA;QAAA;MAAA,sBAC/C,KAAK;QAAA;QAAA;UAAA,gBACC,GAAG,eACP,yBAAY,IAAI,KAAK,MACpB,KAAK,CAAC,UAAU,qBAEf,eAAe;YAAA,IACd,OAAO;cAAA,OAAG,KAAK,CAA8B,OAAO;YAAA;UAAA,EAEvD;QAAA;MAAA;IAAA;EAAA,IAGJ,IAAI,oBACJ,OAAO;IAAA;MAAA,qBACL,KAAK,CAAC,QAAQ,gBACd,oBAAK,CAAC,KAAK,+CAKX;IAAA;EAAA;AAIT","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/TryStatement.tsx"],"sourcesContent":["import { onCleanup, type Children } from \"@alloy-js/core\";\n\nimport { useTSNamePolicy } from \"../name-policy.js\";\nimport type { ParameterDescriptor } from \"../parameter-descriptor.js\";\nimport { createValueSymbol, TSSymbolFlags } from \"../symbols/index.js\";\nimport { BlockScope } from \"./BlockScope.jsx\";\n\nexport interface TryStatementProps {\n children: Children;\n}\n\n/**\n * A try statement.\n *\n * @example\n * ```tsx\n * <TryStatement>\n * // risky operation\n * </TryStatement>\n * <CatchClause parameter=\"error\">\n * console.error(error);\n * </CatchClause>\n * ```\n * renders to\n * ```ts\n * try {\n * // risky operation\n * } catch (error) {\n * console.error(error);\n * }\n * ```\n */\nexport function TryStatement(props: TryStatementProps) {\n return (\n <>\n try <BlockScope>{props.children}</BlockScope>\n </>\n );\n}\n\nexport interface CatchClauseProps {\n parameter?: ParameterDescriptor | string;\n children: Children;\n}\n\n/**\n * A catch clause of a try statement.\n *\n * @example\n * ```tsx\n * <CatchClause parameter={{ name: \"error\", type: \"unknown\" }}>\n * console.error(error);\n * </CatchClause>\n * ```\n * renders to\n * ```ts\n * catch (error: unknown) {\n * console.error(error);\n * }\n * ```\n *\n * @remarks\n * The parameter can be omitted for a catch-all clause, or provided as a string\n * or {@link ParameterDescriptor}. When using a descriptor, a refkey can be provided\n * to reference the parameter within the catch block. Note that TypeScript only allows\n * `any` or `unknown` as catch parameter types.\n */\nexport function CatchClause(props: CatchClauseProps) {\n if (!props.parameter) {\n return (\n <>\n {\" \"}\n catch <BlockScope>{props.children}</BlockScope>\n </>\n );\n }\n\n const namePolicy = useTSNamePolicy();\n const paramDesc =\n typeof props.parameter === \"string\"\n ? { name: props.parameter }\n : props.parameter;\n\n const symbol = createValueSymbol(paramDesc.name, {\n refkeys: paramDesc.refkey,\n tsFlags: TSSymbolFlags.ParameterSymbol,\n metadata: paramDesc.metadata,\n namePolicy: namePolicy.for(\"parameter\"),\n });\n\n onCleanup(() => {\n symbol.delete();\n });\n\n const param = (\n <>\n {symbol.name}\n {paramDesc.type && <>: {paramDesc.type}</>}\n </>\n );\n\n return (\n <>\n {\" \"}\n catch ({param}) <BlockScope>{props.children}</BlockScope>\n </>\n );\n}\n\nexport interface FinallyClauseProps {\n children: Children;\n}\n\n/**\n * A finally clause of a try statement.\n *\n * @example\n * ```tsx\n * <TryStatement>\n * // risky operation\n * </TryStatement>\n * <FinallyClause>\n * // cleanup\n * </FinallyClause>\n * ```\n * renders to\n * ```ts\n * try {\n * // risky operation\n * } finally {\n * // cleanup\n * }\n * ```\n */\nexport function FinallyClause(props: FinallyClauseProps) {\n return (\n <>\n {\" \"}\n finally <BlockScope>{props.children}</BlockScope>\n </>\n );\n}\n"],"mappings":";AAAA,SAAS,SAAS,QAAuB,gBAAgB;AAEzD,SAAS,eAAe,QAAQ,mBAAmB;AAEnD,SAAS,iBAAiB,EAAE,aAAa,QAAQ,qBAAqB;AACtE,SAAS,UAAU;AAMnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,YAAY,CAAC,KAAwB,EAAE;EACrD,kCAES,UAAU;IAAA;MAAA,OAAE,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGrC;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAE;EACnD,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;IACpB,QAEK,GAAG,8BACG,UAAU;MAAA;QAAA,OAAE,KAAK,CAAC,QAAQ;MAAA;IAAA;EAGvC;EAEA,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC;EACpC,MAAM,SAAS,GACb,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,GAC/B;IAAE,IAAI,EAAE,KAAK,CAAC;EAAU,CAAC,GACzB,KAAK,CAAC,SAAS;EAErB,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,OAAO,EAAE,aAAa,CAAC,eAAe;IACtC,QAAQ,EAAE,SAAS,CAAC,QAAQ;IAC5B,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,WAAW;EACxC,CAAC,CAAC;EAEF,SAAS,CAAC,MAAM;IACd,MAAM,CAAC,MAAM,CAAC,CAAC;EACjB,CAAC,CAAC;EAEF,MAAM,KAAK,iBAEN,MAAM,CAAC,IAAI,gBACX,wBAAS,CAAC,IAAI,2BAAS,SAAS,CAAC,IAAI,EAAI,EAE7C;EAED,QAEK,GAAG,aACI,KAAK,0BAAI,UAAU;IAAA;MAAA,OAAE,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGjD;AAMA;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,QAEK,GAAG,gCACK,UAAU;IAAA;MAAA,OAAE,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGzC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/TryStatement.test.tsx"],"sourcesContent":["import { refkey, StatementList } from \"@alloy-js/core\";\nimport { expect, it } from \"vitest\";\n\nimport { TestFile } from \"../../test/utils.js\";\nimport { CatchClause, FinallyClause, TryStatement } from \"./TryStatement.jsx\";\nimport { VarDeclaration } from \"./VarDeclaration.jsx\";\n\nit(\"works with try-catch\", () => {\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <CatchClause parameter=\"error\">// handle error</CatchClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } catch (error) {\n // handle error\n }\n `);\n});\n\nit(\"works with try-catch-finally\", () => {\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <CatchClause parameter=\"error\">// handle error</CatchClause>\n <FinallyClause>// cleanup</FinallyClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } catch (error) {\n // handle error\n } finally {\n // cleanup\n }\n `);\n});\n\nit(\"works with try-finally\", () => {\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <FinallyClause>// cleanup</FinallyClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } finally {\n // cleanup\n }\n `);\n});\n\nit(\"works with catch without parameter\", () => {\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <CatchClause>// handle error without parameter</CatchClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } catch {\n // handle error without parameter\n }\n `);\n});\n\nit(\"works with typed catch parameter\", () => {\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <CatchClause parameter={{ name: \"error\", type: \"Error\" }}>\n // handle typed error\n </CatchClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } catch (error: Error) {\n // handle typed error\n }\n `);\n});\n\nit(\"creates symbols for catch parameters\", () => {\n const rk = refkey();\n\n expect(\n <TestFile>\n <TryStatement>// try something</TryStatement>\n <CatchClause parameter={{ name: \"error\", type: \"Error\", refkey: rk }}>\n <StatementList>\n {rk}\n <VarDeclaration name=\"message\" type=\"string\">\n {rk}.message\n </VarDeclaration>\n </StatementList>\n </CatchClause>\n </TestFile>,\n ).toRenderTo(`\n try {\n // try something\n } catch (error: Error) {\n error;\n const message: string = error.message;\n }\n `);\n});\n"],"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A;MAAA,0BACN,YAAY;QAAA;MAAA,sBACZ,WAAW;QAAC,SAAS,EAAE;UAAE,IAAI,EAAE,OAAO;UAAE,IAAI,EAAE;QAAQ,CAAC;QAAA;MAAA;IAAA;EAAA,EAI5D,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,sCAAsC,EAAE,MAAM;EAC/C,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;EAEnB,MAAM,mBACH,QAAQ;IAAA;MAAA,0BACN,YAAY;QAAA;MAAA,sBACZ,WAAW;QAAC,SAAS,EAAE;UAAE,IAAI,EAAE,OAAO;UAAE,IAAI,EAAE,OAAO;UAAE,MAAM,EAAE;QAAG,CAAC;QAAA;UAAA,yBACjE,aAAa;YAAA;cAAA,QACX,EAAE,oBACF,cAAc;gBAAC,IAAI;gBAAW,IAAI;gBAAA;kBAAA,QAChC,EAAE;gBAAA;cAAA;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA,EAKb,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/TsConfigJson.tsx"],"sourcesContent":["import { effect, memo, SourceFile } from \"@alloy-js/core\";\nimport { dirname, join, relative, sep } from \"pathe\";\n\nimport { usePackage } from \"./PackageDirectory.js\";\n\nexport interface TSConfigJsonProps {\n outDir?: string;\n}\n\nexport function TSConfigJson(props: TSConfigJsonProps) {\n const pkg = usePackage();\n if (!pkg) {\n throw new Error(\n \"TSConfigJson component needs to be inside a PackageDirectory\",\n );\n }\n const outDir = props.outDir ?? \"dist\";\n const includeDirs = memo(() => {\n const rootDirs = new Set<string>();\n for (const mod of pkg.scope.modules) {\n const rootDir = dirname(mod.name).split(sep)[0];\n rootDirs.add(rootDir);\n }\n\n if (rootDirs.has(\".\")) {\n return [\".\"];\n } else {\n return Array.from(rootDirs);\n }\n });\n\n effect(\n () => {\n const dirs = includeDirs();\n if (dirs.length === 1) {\n pkg.outFileMapper.value = (path: string) =>\n join(outDir, relative(dirs[0], path));\n } else {\n pkg.outFileMapper.value = (path: string) => join(outDir, path);\n }\n },\n undefined,\n {\n debug: {\n name: \"TsConfigJson:outFileMapper\",\n type: \"render\",\n },\n },\n );\n\n const jsonContent = memo(() => {\n const jsonContent = {\n compilerOptions: {\n target: \"esnext\",\n module: \"nodenext\",\n strict: true,\n declaration: true,\n sourceMap: true,\n declarationMap: true,\n outDir: \"dist\",\n },\n include: includeDirs().map((d) => `${d}/**/*.ts`),\n exclude: [\"node_modules\", \"dist\"],\n };\n\n return JSON.stringify(jsonContent, null, 2);\n });\n\n return (\n <SourceFile path=\"tsconfig.json\" filetype=\"json\">\n {jsonContent}\n </SourceFile>\n );\n}\n"],"mappings":";AAAA,SAAS,MAAM,EAAE,IAAI,EAAE,UAAU,QAAQ,gBAAgB;AACzD,SAAS,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,QAAQ,OAAO;AAEpD,SAAS,UAAU,QAAQ,uBAAuB;AAMlD,OAAO,SAAS,YAAY,CAAC,KAAwB,EAAE;EACrD,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC;EACxB,IAAI,CAAC,GAAG,EAAE;IACR,MAAM,IAAI,KAAK,CACb,8DACF,CAAC;EACH;EACA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM;EACrC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM;IAC7B,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAS,CAAC;IAClC,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE;MACnC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,C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AAI;IAAiB,QAAQ;IAAA,UACtC;EAAW;AAGlB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonDeclarationProps } from "./Declaration.js";
|
|
1
|
+
import type { CommonDeclarationProps } from "./Declaration.js";
|
|
2
2
|
export interface TypeDeclarationProps extends CommonDeclarationProps {
|
|
3
3
|
}
|
|
4
4
|
export declare const TypeDeclaration: import("@alloy-js/core").Component<TypeDeclarationProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/TypeDeclaration.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"TypeDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/TypeDeclaration.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAK/D,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;CAAG;AAEvE,eAAO,MAAM,eAAe,0DAc1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/TypeDeclaration.tsx"],"sourcesContent":["import { Name, Show } from \"@alloy-js/core\";\n\nimport type { CommonDeclarationProps } from \"./Declaration.js\";\nimport { Declaration } from \"./Declaration.js\";\nimport { JSDoc } from \"./JSDoc.jsx\";\nimport { ensureTypeRefContext } from \"./TypeRefContext.jsx\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {}\n\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps,\n) {\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <JSDoc children={props.doc} />\n <hbr />\n </Show>\n <Declaration {...props} kind=\"type\" nameKind=\"type\">\n type <Name /> = {props.children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";AAAA,SAAS,IAAI,EAAE,IAAI,QAAQ,gBAAgB;AAG3C,SAAS,WAAW,QAAQ,kBAAkB;AAC9C,SAAS,KAAK;AACd,SAAS,oBAAoB;AAI7B,OAAO,MAAM,eAAe,GAAG,oBAAoB,CAAC,SAAS,eAAe,CAC1E,KAA2B,EAC3B;EACA,0BAEK,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;IAAA;IAAA;MAAA,0BAC3B,KAAK;QAAA,IAAC,QAAQ;UAAA,OAAE,KAAK,CAAC,GAAG;QAAA;MAAA;IAAA;EAAA,sBAG3B,WAAW,eAAK,KAAK;IAAE,IAAI;IAAQ,QAAQ;IAAA;MAAA,mCACpC,IAAI,2BAAO,KAAK,CAAC,QAAQ;IAAA;EAAA;AAIvC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/TypeRefContext.tsx"],"sourcesContent":["import type { Children, Component } from \"@alloy-js/core\";\n\nimport {\n isTypeRefContext,\n TypeRefContext as TypeRefContextDef,\n} from \"../context/type-ref-context.jsx\";\n\nexport interface TypeRefContextProps {\n /**\n * Children\n */\n children: Children;\n}\n\n/**\n * Set the current context of reference to be type reference.\n *\n * @remarks\n * References used inside the children of this component will be treated as type reference {@link Reference}.\n *\n * Prefer using {@link ensureTypeRefContext} when wrapping the whole component to reduce tree nodes.\n */\nexport const TypeRefContext = ({ children }: TypeRefContextProps) => {\n return (\n <TypeRefContextDef.Provider value={{ type: true }}>\n {children}\n </TypeRefContextDef.Provider>\n );\n};\n\n/** Ensure the current component is inside a type ref context.\n * If not it will wrap in a {@link TypeRefContext} component.\n * If yes it will not add an extra node and return the original component.\n */\nexport function ensureTypeRefContext<TProps>(\n Comp: Component<TProps>,\n): Component<TProps> {\n return function EnsureTypeRefContext(props: TProps) {\n const ref = isTypeRefContext();\n if (!ref) {\n return (\n <TypeRefContextDef.Provider value={{ type: true }}>\n <Comp {...props} />\n </TypeRefContextDef.Provider>\n );\n }\n\n return <Comp {...props} />;\n };\n}\n"],"mappings":";AAEA,SACE,gBAAgB,EAChB,cAAc,IAAI,iBAAiB;AAUrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,cAAc,GAAG,CAAC;EAAE;AAA8B,CAAC,KAAK;EACnE,yBACG,iBAAiB,CAAC,QAAQ;IAAC,KAAK,EAAE;MAAE,IAAI,EAAE;IAAK,CAAC;IAAA,UAC9C;EAAQ;AAGf,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAAS,oBAAoB,CAClC,IAAuB,EACJ;EACnB,OAAO,SAAS,oBAAoB,CAAC,KAAa,EAAE;IAClD,MAAM,GAAG,GAAG,gBAAgB,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE;MACR,yBACG,iBAAiB,CAAC,QAAQ;QAAC,KAAK,EAAE;UAAE,IAAI,EAAE;QAAK,CAAC;QAAA;UAAA,yBAC9C,IAAI,EAAK,KAAK;QAAA;MAAA;IAGrB;IAEA,yBAAQ,IAAI,EAAK,KAAK;EACxB,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ValueExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"ValueExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ValueExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,QAAQ,CA2BrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ValueExpression.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport { memo } from \"@alloy-js/core\";\n\nimport { ArrayExpression } from \"./ArrayExpression.js\";\nimport { ObjectExpression } from \"./ObjectExpression.js\";\n\nexport interface ValueExpressionProps {\n jsValue?: unknown;\n}\n\nexport function ValueExpression(props: ValueExpressionProps): Children {\n return memo((): Children => {\n const jsValue = props.jsValue;\n\n if (typeof jsValue === \"undefined\") {\n return \"undefined\";\n } else if (typeof jsValue === \"number\" || typeof jsValue === \"boolean\") {\n return String(jsValue);\n } else if (typeof jsValue === \"bigint\") {\n return `${jsValue}n`;\n } else if (typeof jsValue === \"string\") {\n return JSON.stringify(jsValue);\n } else if (typeof jsValue === \"object\") {\n if (jsValue === null) {\n return \"null\";\n } else if (Array.isArray(jsValue)) {\n return <ArrayExpression jsValue={jsValue as unknown[]} />;\n } else {\n return (\n <ObjectExpression jsValue={jsValue as Record<string, unknown>} />\n );\n }\n } else if (typeof jsValue === \"function\") {\n // functions are inserted as-is.\n return jsValue as () => Children;\n }\n });\n}\n"],"mappings":";AACA,SAAS,IAAI,QAAQ,gBAAgB;AAErC,SAAS,eAAe,QAAQ,sBAAsB;AACtD,SAAS,gBAAgB,QAAQ,uBAAuB;AAMxD,OAAO,SAAS,eAAe,CAAC,KAA2B,EAAY;EACrE,OAAO,IAAI,CAAC,MAAgB;IAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO;IAE7B,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;MAClC,OAAO,WAAW;IACpB,CAAC,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;MACtE,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;MACtC,OAAO,GAAG,OAAO,GAAG;IACtB,CAAC,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;MACtC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IAChC,CAAC,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;MACtC,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO,MAAM;MACf,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACjC,yBAAQ,eAAe;UAAC,OAAO,EAAE;QAAO;MAC1C,CAAC,MAAM;QACL,yBACG,gBAAgB;UAAC,OAAO,EAAE;QAAO;MAEtC;IACF,CAAC,MAAM,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;MACxC;MACA,OAAO,OAAO;IAChB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core";
|
|
2
|
-
import { CommonDeclarationProps } from "./Declaration.js";
|
|
1
|
+
import type { Children } from "@alloy-js/core";
|
|
2
|
+
import type { CommonDeclarationProps } from "./Declaration.js";
|
|
3
3
|
export interface VarDeclarationProps extends CommonDeclarationProps {
|
|
4
4
|
const?: boolean;
|
|
5
5
|
let?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VarDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/VarDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"VarDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/VarDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAW/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI/D,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,YA8CxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/VarDeclaration.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport {\n Declaration as CoreDeclaration,\n createSymbolSlot,\n Name,\n Show,\n} from \"@alloy-js/core\";\n\nimport { useTSNamePolicy } from \"../name-policy.js\";\nimport { createValueSymbol } from \"../symbols/index.js\";\nimport { TSSymbolFlags } from \"../symbols/ts-output-symbol.js\";\nimport type { CommonDeclarationProps } from \"./Declaration.js\";\nimport { JSDoc } from \"./JSDoc.jsx\";\nimport { TypeRefContext } from \"./TypeRefContext.jsx\";\n\nexport interface VarDeclarationProps extends CommonDeclarationProps {\n const?: boolean;\n let?: boolean;\n var?: boolean;\n initializer?: Children;\n type?: Children;\n nullish?: boolean;\n}\n\nexport function VarDeclaration(props: VarDeclarationProps) {\n const TypeSymbolSlot = createSymbolSlot();\n const ValueTypeSymbolSlot = createSymbolSlot();\n const sym = createValueSymbol(props.name, {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None,\n type: props.type ? TypeSymbolSlot.firstSymbol : undefined,\n namePolicy: useTSNamePolicy().for(\"variable\"),\n });\n\n if (!props.type) {\n ValueTypeSymbolSlot.moveMembersTo(sym);\n }\n\n const keyword = props.var ? \"var\" : props.let ? \"let\" : \"const\";\n const type = props.type ? (\n <TypeRefContext>\n : <TypeSymbolSlot>{props.type}</TypeSymbolSlot>\n </TypeRefContext>\n ) : undefined;\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <JSDoc children={props.doc} />\n <hbr />\n </Show>\n <CoreDeclaration symbol={sym}>\n {props.export ? \"export \" : \"\"}\n {props.default ? \"default \" : \"\"}\n <Show when={!props.default}>\n {keyword} <Name />\n {type}\n <Show when={Boolean(props.initializer || props.children)}>\n {\" = \"}\n </Show>\n </Show>\n <ValueTypeSymbolSlot>\n {props.initializer ?? props.children}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </>\n );\n}\n"],"mappings":";AACA,SACE,WAAW,IAAI,eAAe,EAC9B,gBAAgB,EAChB,IAAI,EACJ,IAAI,QACC,gBAAgB;AAEvB,SAAS,eAAe,QAAQ,mBAAmB;AACnD,SAAS,iBAAiB,QAAQ,qBAAqB;AACvD,SAAS,aAAa,QAAQ,gCAAgC;AAE9D,SAAS,KAAK;AACd,SAAS,cAAc;AAWvB,OAAO,SAAS,cAAc,CAAC,KAA0B,EAAE;EACzD,MAAM,cAAc,GAAG,gBAAgB,CAAC,CAAC;EACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,CAAC;EAC9C,MAAM,GAAG,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE;IACxC,OAAO,EAAE,KAAK,CAAC,MAAM;IACrB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,GAAG,aAAa,CAAC,IAAI;IACnE,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,cAAc,CAAC,WAAW,GAAG,SAAS;IACzD,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU;EAC9C,CAAC,CAAC;EAEF,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;IACf,mBAAmB,CAAC,aAAa,CAAC,GAAG,CAAC;EACxC;EAEA,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,GAAG,OAAO;EAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,qBACpB,cAAc;IAAA;MAAA,gCACV,cAAc;QAAA;UAAA,OAAE,KAAK,CAAC,IAAI;QAAA;MAAA;IAAA;EAAA,KAE7B,SAAS;EAEb,0BAEK,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;IAAA;IAAA;MAAA,0BAC3B,KAAK;QAAA,IAAC,QAAQ;UAAA,OAAE,KAAK,CAAC,GAAG;QAAA;MAAA;IAAA;EAAA,sBAG3B,eAAe;IAAC,MAAM,EAAE,GAAG;IAAA;MAAA,qBACzB,KAAK,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,gBAC7B,KAAK,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,qBAC/B,IAAI;QAAA,IAAC,IAAI;UAAA,OAAE,CAAC,KAAK,CAAC,OAAO;QAAA;QAAA;UAAA,QACvB,OAAO,yBAAG,IAAI,OACd,IAAI,oBACJ,IAAI;YAAA,IAAC,IAAI;cAAA,OAAE,OAAO,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC;YAAA;YAAA,UACrD;UAAK;QAAA;MAAA,sBAGT,mBAAmB;QAAA;UAAA,OACjB,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,QAAQ;QAAA;MAAA;IAAA;EAAA;AAK9C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,4BAA4B,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export type * from \"../parameter-descriptor.js\";\nexport * from \"./ArrayExpression.js\";\nexport * from \"./ArrowFunction.jsx\";\nexport * from \"./BarrelFile.js\";\nexport * from \"./BlockScope.js\";\nexport * from \"./CallSignature.jsx\";\nexport * from \"./ClassDeclaration.jsx\";\nexport * from \"./CommaList.jsx\";\nexport * from \"./Declaration.js\";\nexport * from \"./EnumDeclaration.js\";\nexport * from \"./EnumMember.js\";\nexport * from \"./ExportStatement.js\";\nexport {\n type FunctionBodyProps,\n type FunctionParametersProps,\n type FunctionTypeParametersProps,\n type TypeParametersProps,\n} from \"./FunctionBase.js\";\nexport * from \"./FunctionCallExpression.js\";\nexport * from \"./FunctionDeclaration.js\";\nexport * from \"./FunctionExpression.js\";\nexport * from \"./FunctionType.jsx\";\nexport * from \"./IfStatement.jsx\";\nexport * from \"./ImportStatement.js\";\nexport * from \"./Interface.js\";\nexport * from \"./InterfaceMethod.jsx\";\nexport * from \"./JSDoc.jsx\";\nexport * from \"./JSDocComment.jsx\";\nexport * from \"./JSDocExample.jsx\";\nexport * from \"./MemberExpression.jsx\";\nexport * from \"./NewExpression.jsx\";\nexport * from \"./ObjectExpression.js\";\nexport * from \"./PackageDirectory.js\";\nexport * from \"./PackageJson.js\";\nexport * from \"./Reference.js\";\nexport * from \"./SingleLineCommentBlock.jsx\";\nexport * from \"./SourceFile.js\";\nexport * from \"./SwitchStatement.jsx\";\nexport * from \"./TryStatement.jsx\";\nexport * from \"./TsConfigJson.js\";\nexport * from \"./TypeDeclaration.js\";\nexport * from \"./TypeRefContext.jsx\";\nexport * from \"./ValueExpression.js\";\nexport * from \"./VarDeclaration.js\";\n"],"mappings":"AACA,cAAc,sBAAsB;AACpC;AACA,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AAOpC,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,yBAAyB;AACvC;AACA;AACA,cAAc,sBAAsB;AACpC,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA,cAAc,mBAAmB;AACjC,cAAc,sBAAsB;AACpC;AACA,cAAc,sBAAsB;AACpC,cAAc,qBAAqB;AAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/components/interface/expression.test.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport { expect, it } from \"vitest\";\n\nimport { TestFile } from \"../../../test/utils.jsx\";\nimport {\n InterfaceDeclaration,\n InterfaceExpression,\n InterfaceMember,\n} from \"../Interface.jsx\";\n\nit(\"render expression\", () => {\n expect(\n <TestFile>\n <InterfaceExpression>\n <InterfaceMember name=\"foo\" type=\"string\" />\n </InterfaceExpression>\n </TestFile>,\n ).toRenderTo(`\n {\n foo: string\n }\n `);\n});\n\nit(\"render nested\", () => {\n expect(\n <TestFile>\n <InterfaceExpression>\n <InterfaceMember name=\"foo\">\n <InterfaceExpression>\n <InterfaceMember name=\"bar\" type=\"string\" />\n </InterfaceExpression>\n </InterfaceMember>\n </InterfaceExpression>\n </TestFile>,\n ).toRenderTo(`\n {\n foo: {\n bar: string\n }\n }\n `);\n});\n\nit(\"separate expressions don't conflict in name\", () => {\n expect(\n <TestFile>\n <List>\n <InterfaceExpression>\n <InterfaceMember name=\"bar\" type=\"string\" />\n </InterfaceExpression>\n <InterfaceExpression>\n <InterfaceMember name=\"bar\" type=\"string\" />\n </InterfaceExpression>\n </List>\n </TestFile>,\n ).toRenderTo(`\n {\n bar: string\n }\n {\n bar: string\n }\n `);\n});\n\nit(\"separate expressions when in interface declaration\", () => {\n expect(\n <TestFile>\n <InterfaceDeclaration name=\"Test\">\n <InterfaceMember name=\"foo\">\n <List joiner=\" | \">\n <InterfaceExpression>\n <InterfaceMember name=\"bar\" type=\"string\" />\n </InterfaceExpression>\n <InterfaceExpression>\n <InterfaceMember name=\"bar\" type=\"string\" />\n </InterfaceExpression>\n </List>\n </InterfaceMember>\n </InterfaceDeclaration>\n </TestFile>,\n ).toRenderTo(`\n interface Test {\n foo: {\n bar: string\n } | {\n bar: string\n }\n }\n `);\n});\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AACrC,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,QAAQ;AACjB,SACE,oBAAoB,EACpB,mBAAmB,EACnB,eAAe;AAGjB,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5B,MAAM,mBACH,QAAQ;IAAA;MAAA,yBACN,mBAAmB;QAAA;UAAA,yBACjB,eAAe;YAAC,IAAI;YAAO,IAAI;UAAA;QAAA;MAAA;IAAA;EAAA,EAGtC,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,eAAe,EAAE,MAAM;EACxB,MAAM,mBACH,QAAQ;IAAA;MAAA,yBACN,mBAAmB;QAAA;UAAA,yBACjB,eAAe;YAAC,IAAI;YAAA;cAAA,yBAClB,mBAAmB;gBAAA;kBAAA,yBACjB,eAAe;oBAAC,IAAI;oBAAO,IAAI;kBAAA;gBAAA;cAAA;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA,EAK1C,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,6CAA6C,EAAE,MAAM;EACtD,MAAM,mBACH,QAAQ;IAAA;MAAA,yBACN,IAAI;QAAA;UAAA,0BACF,mBAAmB;YAAA;cAAA,yBACjB,eAAe;gBAAC,IAAI;gBAAO,IAAI;cAAA;YAAA;UAAA,sBAEjC,mBAAmB;YAAA;cAAA,yBACjB,eAAe;gBAAC,IAAI;gBAAO,IAAI;cAAA;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA,EAIxC,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,oDAAoD,EAAE,MAAM;EAC7D,MAAM,mBACH,QAAQ;IAAA;MAAA,yBACN,oBAAoB;QAAC,IAAI;QAAA;UAAA,yBACvB,eAAe;YAAC,IAAI;YAAA;cAAA,yBAClB,IAAI;gBAAC,MAAM;gBAAA;kBAAA,0BACT,mBAAmB;oBAAA;sBAAA,yBACjB,eAAe;wBAAC,IAAI;wBAAO,IAAI;sBAAA;oBAAA;kBAAA,sBAEjC,mBAAmB;oBAAA;sBAAA,yBACjB,eAAe;wBAAC,IAAI;wBAAO,IAAI;sBAAA;oBAAA;kBAAA;gBAAA;cAAA;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA,EAM5C,CAAC,CAAC,UAAU,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":["// prettier-ignore\nimport * as core from \"@alloy-js/core\";\nimport * as base from \"../index.js\";\n\nexport const ArrayExpression = core.stc(base.ArrayExpression);\nexport const ArrowFunction = core.stc(base.ArrowFunction);\nexport const BarrelFile = core.stc(base.BarrelFile);\nexport const CallSignature = core.stc(base.CallSignature);\nexport const ClassDeclaration = core.stc(base.ClassDeclaration);\nexport const ClassField = core.stc(base.ClassField);\nexport const ClassMember = core.stc(base.ClassMember);\nexport const ClassMethod = core.stc(base.ClassMethod);\nexport const CommaList = core.stc(base.CommaList);\nexport const Declaration = core.stc(base.Declaration);\nexport const EnumDeclaration = core.stc(base.EnumDeclaration);\nexport const EnumMember = core.stc(base.EnumMember);\nexport const ExportStatement = core.stc(base.ExportStatement);\nexport const FunctionCallExpression = core.stc(base.FunctionCallExpression);\nexport const FunctionDeclaration = core.stc(base.FunctionDeclaration);\nexport const FunctionExpression = core.stc(base.FunctionExpression);\nexport const IfStatement = core.stc(base.IfStatement);\nexport const ElseClause = core.stc(base.ElseClause);\nexport const ElseIfClause = core.stc(base.ElseIfClause);\nexport const ImportStatement = core.stc(base.ImportStatement);\nexport const ImportStatements = core.stc(base.ImportStatements);\nexport const InterfaceDeclaration = core.stc(base.InterfaceDeclaration);\nexport const InterfaceExpression = core.stc(base.InterfaceExpression);\nexport const InterfaceMember = core.stc(base.InterfaceMember);\nexport const InterfaceMethod = core.stc(base.InterfaceMethod);\nexport const JSDoc = core.stc(base.JSDoc);\nexport const JSDocExample = core.stc(base.JSDocExample);\nexport const JSDocComment = core.stc(base.JSDocComment);\nexport const MemberExpression = core.stc(base.MemberExpression);\nexport const NewExpression = core.stc(base.NewExpression);\nexport const ObjectExpression = core.stc(base.ObjectExpression);\nexport const ObjectProperty = core.stc(base.ObjectProperty);\nexport const PackageDirectory = core.stc(base.PackageDirectory);\nexport const PackageJsonFile = core.stc(base.PackageJsonFile);\nexport const Reference = core.stc(base.Reference);\nexport const SourceFile = core.stc(base.SourceFile);\nexport const SwitchStatement = core.stc(base.SwitchStatement);\nexport const CaseClause = core.stc(base.CaseClause);\nexport const TSConfigJson = core.stc(base.TSConfigJson);\nexport const FunctionType = core.stc(base.FunctionType);\nexport const TypeDeclaration = core.stc(base.TypeDeclaration);\nexport const TypeRefContext = core.stc(base.TypeRefContext);\nexport const ValueExpression = core.stc(base.ValueExpression);\nexport const VarDeclaration = core.stc(base.VarDeclaration);\n"],"mappings":"AAAA;AACA,OAAO,KAAK,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAK,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,OAAO,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;AACzD,OAAO,MAAM,UAAU,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C/D,OAAO,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,OAAO,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AACjD,OAAO,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;AACnD,OAAO,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,OAAO,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;AACnD,OAAO,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;AACvD,OAAO,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;AACvD,OAAO,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,OAAO,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;AAC3D,OAAO,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,OAAO,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/context/index.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/context/index.ts"],"sourcesContent":["// type ref context isn't exported because it conflicts with the component of the same name.\nexport * from \"./package-metadata.js\";\n"],"mappings":"AAAA;AACA,cAAc,uBAAuB","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { TSPackageScope } from "../symbols/ts-package-scope.js";
|
|
1
|
+
import type { ComponentContext } from "@alloy-js/core";
|
|
2
|
+
import type { TSPackageScope } from "../symbols/ts-package-scope.js";
|
|
3
3
|
export interface PackageMetadataContext {
|
|
4
4
|
versionSpecifiers: Map<TSPackageScope, string>;
|
|
5
5
|
dependencyType: Map<TSPackageScope, "dependencies" | "peerDependencies" | "devDependencies">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-metadata.d.ts","sourceRoot":"","sources":["../../../src/context/package-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"package-metadata.d.ts","sourceRoot":"","sources":["../../../src/context/package-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAC/C,cAAc,EAAE,GAAG,CACjB,cAAc,EACd,cAAc,GAAG,kBAAkB,GAAG,iBAAiB,CACxD,CAAC;CACH;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB,CACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/context/package-metadata.ts"],"sourcesContent":["import type { ComponentContext } from \"@alloy-js/core\";\nimport { createNamedContext } from \"@alloy-js/core\";\n\nimport type { TSPackageScope } from \"../symbols/ts-package-scope.js\";\n\nexport interface PackageMetadataContext {\n versionSpecifiers: Map<TSPackageScope, string>;\n dependencyType: Map<\n TSPackageScope,\n \"dependencies\" | \"peerDependencies\" | \"devDependencies\"\n >;\n}\n\nexport const PackageMetadataContext: ComponentContext<PackageMetadataContext> =\n createNamedContext<PackageMetadataContext>(\"PackageMetadataContext\");\n"],"mappings":"AACA,SAAS,kBAAkB,QAAQ,gBAAgB;AAYnD,OAAO,MAAM,sBAAgE,GAC3E,kBAAkB,CAAyB,wBAAwB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-ref-context.d.ts","sourceRoot":"","sources":["../../../src/context/type-ref-context.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"type-ref-context.d.ts","sourceRoot":"","sources":["../../../src/context/type-ref-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,UAAU,cAAc;IACtB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,cAAc,CACQ,CAAC;AAErE;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/context/type-ref-context.tsx"],"sourcesContent":["import type { ComponentContext } from \"@alloy-js/core\";\nimport { createNamedContext, useContext } from \"@alloy-js/core\";\n\ninterface TypeRefContext {\n /** If in a type context */\n type?: boolean;\n}\n\n/**\n * Provides scopes for instance and static private members.\n */\nexport const TypeRefContext: ComponentContext<TypeRefContext> =\n createNamedContext<TypeRefContext>(\"@alloy-js/typescript TypeRef\");\n\n/**\n * @returns 'true' if in a type context, 'false' if in a value context.\n */\nexport function isTypeRefContext(): boolean {\n return useContext(TypeRefContext)?.type ?? false;\n}\n"],"mappings":"AACA,SAAS,kBAAkB,EAAE,UAAU,QAAQ,gBAAgB;AAO/D;AACA;AACA;AACA,OAAO,MAAM,cAAgD,GAC3D,kBAAkB,CAAiB,8BAA8B,CAAC;;AAEpE;AACA;AACA;AACA,OAAO,SAAS,gBAAgB,GAAY;EAC1C,OAAO,UAAU,CAAC,cAAc,CAAC,EAAE,IAAI,IAAI,KAAK;AAClD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../src/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../src/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAKL,KAAK,MAAM,EAEZ,MAAM,gBAAgB,CAAC;AAQxB,MAAM,WAAW,iBAAiB;IAChC,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACzC;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,eAAe,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;CAChD,CAAC;AAEN;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,iBAAiB;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAA;CAAE,IAC7D,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GA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