@jackctaylor/roblox-ts 3.0.0-projectrefs.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 +716 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/include/Promise.lua +2068 -0
- package/include/RuntimeLib.lua +258 -0
- package/out/CLI/cli.d.ts +2 -0
- package/out/CLI/cli.js +41 -0
- package/out/CLI/commands/build.d.ts +7 -0
- package/out/CLI/commands/build.js +438 -0
- package/out/CLI/errors/CLIError.d.ts +4 -0
- package/out/CLI/errors/CLIError.js +12 -0
- package/out/CLI/index.d.ts +3 -0
- package/out/CLI/index.js +22 -0
- package/out/CLI/test.d.ts +1 -0
- package/out/CLI/test.js +82 -0
- package/out/CLI/util/patchFs.d.ts +1 -0
- package/out/CLI/util/patchFs.js +26 -0
- package/out/Project/classes/VirtualFileSystem.d.ts +14 -0
- package/out/Project/classes/VirtualFileSystem.js +102 -0
- package/out/Project/classes/VirtualProject.d.ts +15 -0
- package/out/Project/classes/VirtualProject.js +121 -0
- package/out/Project/functions/buildProject.d.ts +18 -0
- package/out/Project/functions/buildProject.js +48 -0
- package/out/Project/functions/buildProjectReferences.d.ts +3 -0
- package/out/Project/functions/buildProjectReferences.js +78 -0
- package/out/Project/functions/buildSolution.d.ts +10 -0
- package/out/Project/functions/buildSolution.js +97 -0
- package/out/Project/functions/checkFileName.d.ts +1 -0
- package/out/Project/functions/checkFileName.js +18 -0
- package/out/Project/functions/checkRojoConfig.d.ts +4 -0
- package/out/Project/functions/checkRojoConfig.js +26 -0
- package/out/Project/functions/cleanup.d.ts +2 -0
- package/out/Project/functions/cleanup.js +30 -0
- package/out/Project/functions/compileFiles.d.ts +4 -0
- package/out/Project/functions/compileFiles.js +160 -0
- package/out/Project/functions/compileProject.d.ts +14 -0
- package/out/Project/functions/compileProject.js +71 -0
- package/out/Project/functions/copyFiles.d.ts +3 -0
- package/out/Project/functions/copyFiles.js +13 -0
- package/out/Project/functions/copyInclude.d.ts +2 -0
- package/out/Project/functions/copyInclude.js +17 -0
- package/out/Project/functions/copyItem.d.ts +3 -0
- package/out/Project/functions/copyItem.js +27 -0
- package/out/Project/functions/createNodeModulesPathMapping.d.ts +1 -0
- package/out/Project/functions/createNodeModulesPathMapping.js +31 -0
- package/out/Project/functions/createPathTranslator.d.ts +4 -0
- package/out/Project/functions/createPathTranslator.js +22 -0
- package/out/Project/functions/createProgramFactory.d.ts +3 -0
- package/out/Project/functions/createProgramFactory.js +31 -0
- package/out/Project/functions/createProjectData.d.ts +2 -0
- package/out/Project/functions/createProjectData.js +102 -0
- package/out/Project/functions/createProjectProgram.d.ts +3 -0
- package/out/Project/functions/createProjectProgram.js +11 -0
- package/out/Project/functions/getChangedFilePaths.d.ts +2 -0
- package/out/Project/functions/getChangedFilePaths.js +47 -0
- package/out/Project/functions/getChangedSourceFiles.d.ts +2 -0
- package/out/Project/functions/getChangedSourceFiles.js +19 -0
- package/out/Project/functions/getParsedCommandLine.d.ts +3 -0
- package/out/Project/functions/getParsedCommandLine.js +41 -0
- package/out/Project/functions/getProjectReferences.d.ts +2 -0
- package/out/Project/functions/getProjectReferences.js +65 -0
- package/out/Project/functions/getResolvedProjectReferences.d.ts +3 -0
- package/out/Project/functions/getResolvedProjectReferences.js +43 -0
- package/out/Project/functions/setupProjectWatchProgram.d.ts +2 -0
- package/out/Project/functions/setupProjectWatchProgram.js +352 -0
- package/out/Project/functions/setupSolutionWatchProgram.d.ts +2 -0
- package/out/Project/functions/setupSolutionWatchProgram.js +355 -0
- package/out/Project/functions/tryRemoveOutput.d.ts +2 -0
- package/out/Project/functions/tryRemoveOutput.js +30 -0
- package/out/Project/functions/validateCompilerOptions.d.ts +2 -0
- package/out/Project/functions/validateCompilerOptions.js +87 -0
- package/out/Project/index.d.ts +4 -0
- package/out/Project/index.js +20 -0
- package/out/Project/preEmitDiagnostics/fileUsesCommentDirectives.d.ts +3 -0
- package/out/Project/preEmitDiagnostics/fileUsesCommentDirectives.js +28 -0
- package/out/Project/transformers/builtin/transformPaths.d.ts +5 -0
- package/out/Project/transformers/builtin/transformPaths.js +129 -0
- package/out/Project/transformers/builtin/transformTypeReferenceDirectives.d.ts +2 -0
- package/out/Project/transformers/builtin/transformTypeReferenceDirectives.js +23 -0
- package/out/Project/transformers/createTransformerList.d.ts +4 -0
- package/out/Project/transformers/createTransformerList.js +87 -0
- package/out/Project/transformers/createTransformerWatcher.d.ts +3 -0
- package/out/Project/transformers/createTransformerWatcher.js +59 -0
- package/out/Project/transformers/getPluginConfigs.d.ts +2 -0
- package/out/Project/transformers/getPluginConfigs.js +34 -0
- package/out/Project/util/createReadBuildProgramHost.d.ts +5 -0
- package/out/Project/util/createReadBuildProgramHost.js +15 -0
- package/out/Project/util/getCustomPreEmitDiagnostics.d.ts +4 -0
- package/out/Project/util/getCustomPreEmitDiagnostics.js +13 -0
- package/out/Project/util/isCompilableFile.d.ts +1 -0
- package/out/Project/util/isCompilableFile.js +18 -0
- package/out/Project/util/walkDirectorySync.d.ts +1 -0
- package/out/Project/util/walkDirectorySync.js +22 -0
- package/out/Shared/classes/Lazy.d.ts +8 -0
- package/out/Shared/classes/Lazy.js +22 -0
- package/out/Shared/classes/LogService.d.ts +9 -0
- package/out/Shared/classes/LogService.js +37 -0
- package/out/Shared/constants.d.ts +23 -0
- package/out/Shared/constants.js +50 -0
- package/out/Shared/diagnostics.d.ts +79 -0
- package/out/Shared/diagnostics.js +140 -0
- package/out/Shared/errors/DiagnosticError.d.ts +7 -0
- package/out/Shared/errors/DiagnosticError.js +16 -0
- package/out/Shared/errors/LoggableError.d.ts +5 -0
- package/out/Shared/errors/LoggableError.js +14 -0
- package/out/Shared/errors/ProjectError.d.ts +4 -0
- package/out/Shared/errors/ProjectError.js +12 -0
- package/out/Shared/index.d.ts +0 -0
- package/out/Shared/index.js +2 -0
- package/out/Shared/types.d.ts +50 -0
- package/out/Shared/types.js +3 -0
- package/out/Shared/util/assert.d.ts +1 -0
- package/out/Shared/util/assert.js +12 -0
- package/out/Shared/util/benchmark.d.ts +3 -0
- package/out/Shared/util/benchmark.js +32 -0
- package/out/Shared/util/createDiagnosticWithLocation.d.ts +3 -0
- package/out/Shared/util/createDiagnosticWithLocation.js +29 -0
- package/out/Shared/util/createGithubLink.d.ts +1 -0
- package/out/Shared/util/createGithubLink.js +12 -0
- package/out/Shared/util/createTextDiagnostic.d.ts +2 -0
- package/out/Shared/util/createTextDiagnostic.js +18 -0
- package/out/Shared/util/findAncestorDir.d.ts +1 -0
- package/out/Shared/util/findAncestorDir.js +16 -0
- package/out/Shared/util/findLastIndex.d.ts +1 -0
- package/out/Shared/util/findLastIndex.js +12 -0
- package/out/Shared/util/formatDiagnostics.d.ts +2 -0
- package/out/Shared/util/formatDiagnostics.js +19 -0
- package/out/Shared/util/getCanonicalFileName.d.ts +2 -0
- package/out/Shared/util/getCanonicalFileName.js +10 -0
- package/out/Shared/util/getOrSetDefault.d.ts +1 -0
- package/out/Shared/util/getOrSetDefault.js +12 -0
- package/out/Shared/util/getRootDirs.d.ts +2 -0
- package/out/Shared/util/getRootDirs.js +10 -0
- package/out/Shared/util/hasErrors.d.ts +2 -0
- package/out/Shared/util/hasErrors.js +11 -0
- package/out/Shared/util/isPathDescendantOf.d.ts +1 -0
- package/out/Shared/util/isPathDescendantOf.js +11 -0
- package/out/Shared/util/realPathExistsSync.d.ts +1 -0
- package/out/Shared/util/realPathExistsSync.js +13 -0
- package/out/Shared/warn.d.ts +1 -0
- package/out/Shared/warn.js +12 -0
- package/out/TSTransformer/classes/DiagnosticService.d.ts +11 -0
- package/out/TSTransformer/classes/DiagnosticService.js +37 -0
- package/out/TSTransformer/classes/MacroManager.d.ts +46 -0
- package/out/TSTransformer/classes/MacroManager.js +178 -0
- package/out/TSTransformer/classes/MultiTransformState.d.ts +9 -0
- package/out/TSTransformer/classes/MultiTransformState.js +15 -0
- package/out/TSTransformer/classes/TransformState.d.ts +73 -0
- package/out/TSTransformer/classes/TransformState.js +307 -0
- package/out/TSTransformer/index.d.ts +4 -0
- package/out/TSTransformer/index.js +23 -0
- package/out/TSTransformer/macros/callMacros.d.ts +2 -0
- package/out/TSTransformer/macros/callMacros.js +56 -0
- package/out/TSTransformer/macros/constructorMacros.d.ts +2 -0
- package/out/TSTransformer/macros/constructorMacros.js +97 -0
- package/out/TSTransformer/macros/identifierMacros.d.ts +2 -0
- package/out/TSTransformer/macros/identifierMacros.js +7 -0
- package/out/TSTransformer/macros/propertyCallMacros.d.ts +4 -0
- package/out/TSTransformer/macros/propertyCallMacros.js +726 -0
- package/out/TSTransformer/macros/types.d.ts +12 -0
- package/out/TSTransformer/macros/types.js +3 -0
- package/out/TSTransformer/nodes/binding/transformArrayAssignmentPattern.d.ts +4 -0
- package/out/TSTransformer/nodes/binding/transformArrayAssignmentPattern.js +78 -0
- package/out/TSTransformer/nodes/binding/transformArrayBindingPattern.d.ts +4 -0
- package/out/TSTransformer/nodes/binding/transformArrayBindingPattern.js +52 -0
- package/out/TSTransformer/nodes/binding/transformBindingName.d.ts +4 -0
- package/out/TSTransformer/nodes/binding/transformBindingName.js +30 -0
- package/out/TSTransformer/nodes/binding/transformObjectAssignmentPattern.d.ts +4 -0
- package/out/TSTransformer/nodes/binding/transformObjectAssignmentPattern.js +97 -0
- package/out/TSTransformer/nodes/binding/transformObjectBindingPattern.d.ts +4 -0
- package/out/TSTransformer/nodes/binding/transformObjectBindingPattern.js +57 -0
- package/out/TSTransformer/nodes/class/transformClassConstructor.d.ts +7 -0
- package/out/TSTransformer/nodes/class/transformClassConstructor.js +96 -0
- package/out/TSTransformer/nodes/class/transformClassLikeDeclaration.d.ts +7 -0
- package/out/TSTransformer/nodes/class/transformClassLikeDeclaration.js +262 -0
- package/out/TSTransformer/nodes/class/transformDecorators.d.ts +4 -0
- package/out/TSTransformer/nodes/class/transformDecorators.js +179 -0
- package/out/TSTransformer/nodes/class/transformPropertyDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/class/transformPropertyDeclaration.js +33 -0
- package/out/TSTransformer/nodes/expressions/transformArrayLiteralExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformArrayLiteralExpression.js +79 -0
- package/out/TSTransformer/nodes/expressions/transformAwaitExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformAwaitExpression.js +13 -0
- package/out/TSTransformer/nodes/expressions/transformBinaryExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformBinaryExpression.js +199 -0
- package/out/TSTransformer/nodes/expressions/transformBooleanLiteral.d.ts +3 -0
- package/out/TSTransformer/nodes/expressions/transformBooleanLiteral.js +15 -0
- package/out/TSTransformer/nodes/expressions/transformCallExpression.d.ts +7 -0
- package/out/TSTransformer/nodes/expressions/transformCallExpression.js +191 -0
- package/out/TSTransformer/nodes/expressions/transformClassExpression.d.ts +3 -0
- package/out/TSTransformer/nodes/expressions/transformClassExpression.js +10 -0
- package/out/TSTransformer/nodes/expressions/transformConditionalExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformConditionalExpression.js +55 -0
- package/out/TSTransformer/nodes/expressions/transformDeleteExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformDeleteExpression.js +14 -0
- package/out/TSTransformer/nodes/expressions/transformElementAccessExpression.d.ts +5 -0
- package/out/TSTransformer/nodes/expressions/transformElementAccessExpression.js +62 -0
- package/out/TSTransformer/nodes/expressions/transformExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformExpression.js +107 -0
- package/out/TSTransformer/nodes/expressions/transformFunctionExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformFunctionExpression.js +46 -0
- package/out/TSTransformer/nodes/expressions/transformIdentifier.d.ts +5 -0
- package/out/TSTransformer/nodes/expressions/transformIdentifier.js +147 -0
- package/out/TSTransformer/nodes/expressions/transformImportExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformImportExpression.js +30 -0
- package/out/TSTransformer/nodes/expressions/transformJsxElement.d.ts +3 -0
- package/out/TSTransformer/nodes/expressions/transformJsxElement.js +8 -0
- package/out/TSTransformer/nodes/expressions/transformJsxExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformJsxExpression.js +19 -0
- package/out/TSTransformer/nodes/expressions/transformJsxFragment.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformJsxFragment.js +28 -0
- package/out/TSTransformer/nodes/expressions/transformJsxSelfClosingElement.d.ts +3 -0
- package/out/TSTransformer/nodes/expressions/transformJsxSelfClosingElement.js +8 -0
- package/out/TSTransformer/nodes/expressions/transformNewExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformNewExpression.js +26 -0
- package/out/TSTransformer/nodes/expressions/transformNoSubstitutionTemplateLiteral.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformNoSubstitutionTemplateLiteral.js +14 -0
- package/out/TSTransformer/nodes/expressions/transformNumericLiteral.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformNumericLiteral.js +13 -0
- package/out/TSTransformer/nodes/expressions/transformObjectLiteralExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformObjectLiteralExpression.js +98 -0
- package/out/TSTransformer/nodes/expressions/transformOmittedExpression.d.ts +2 -0
- package/out/TSTransformer/nodes/expressions/transformOmittedExpression.js +11 -0
- package/out/TSTransformer/nodes/expressions/transformParenthesizedExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformParenthesizedExpression.js +19 -0
- package/out/TSTransformer/nodes/expressions/transformPropertyAccessExpression.d.ts +5 -0
- package/out/TSTransformer/nodes/expressions/transformPropertyAccessExpression.js +36 -0
- package/out/TSTransformer/nodes/expressions/transformSpreadElement.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformSpreadElement.js +35 -0
- package/out/TSTransformer/nodes/expressions/transformStringLiteral.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformStringLiteral.js +12 -0
- package/out/TSTransformer/nodes/expressions/transformSuperKeyword.d.ts +2 -0
- package/out/TSTransformer/nodes/expressions/transformSuperKeyword.js +11 -0
- package/out/TSTransformer/nodes/expressions/transformTaggedTemplateExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformTaggedTemplateExpression.js +27 -0
- package/out/TSTransformer/nodes/expressions/transformTemplateExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformTemplateExpression.js +25 -0
- package/out/TSTransformer/nodes/expressions/transformThisExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformThisExpression.js +29 -0
- package/out/TSTransformer/nodes/expressions/transformTypeExpression.d.ts +3 -0
- package/out/TSTransformer/nodes/expressions/transformTypeExpression.js +8 -0
- package/out/TSTransformer/nodes/expressions/transformUnaryExpression.d.ts +5 -0
- package/out/TSTransformer/nodes/expressions/transformUnaryExpression.js +68 -0
- package/out/TSTransformer/nodes/expressions/transformVoidExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformVoidExpression.js +14 -0
- package/out/TSTransformer/nodes/expressions/transformYieldExpression.d.ts +4 -0
- package/out/TSTransformer/nodes/expressions/transformYieldExpression.js +46 -0
- package/out/TSTransformer/nodes/jsx/transformJsx.d.ts +4 -0
- package/out/TSTransformer/nodes/jsx/transformJsx.js +36 -0
- package/out/TSTransformer/nodes/jsx/transformJsxAttributes.d.ts +4 -0
- package/out/TSTransformer/nodes/jsx/transformJsxAttributes.js +83 -0
- package/out/TSTransformer/nodes/jsx/transformJsxChildren.d.ts +4 -0
- package/out/TSTransformer/nodes/jsx/transformJsxChildren.js +34 -0
- package/out/TSTransformer/nodes/jsx/transformJsxTagName.d.ts +4 -0
- package/out/TSTransformer/nodes/jsx/transformJsxTagName.js +42 -0
- package/out/TSTransformer/nodes/statements/transformBlock.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformBlock.js +14 -0
- package/out/TSTransformer/nodes/statements/transformBreakStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformBreakStatement.js +24 -0
- package/out/TSTransformer/nodes/statements/transformClassDeclaration.d.ts +3 -0
- package/out/TSTransformer/nodes/statements/transformClassDeclaration.js +8 -0
- package/out/TSTransformer/nodes/statements/transformContinueStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformContinueStatement.js +24 -0
- package/out/TSTransformer/nodes/statements/transformDoStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformDoStatement.js +31 -0
- package/out/TSTransformer/nodes/statements/transformEnumDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformEnumDeclaration.js +97 -0
- package/out/TSTransformer/nodes/statements/transformExportAssignment.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformExportAssignment.js +53 -0
- package/out/TSTransformer/nodes/statements/transformExportDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformExportDeclaration.js +109 -0
- package/out/TSTransformer/nodes/statements/transformExpressionStatement.d.ts +5 -0
- package/out/TSTransformer/nodes/statements/transformExpressionStatement.js +62 -0
- package/out/TSTransformer/nodes/statements/transformForOfStatement.d.ts +5 -0
- package/out/TSTransformer/nodes/statements/transformForOfStatement.js +375 -0
- package/out/TSTransformer/nodes/statements/transformForStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformForStatement.js +371 -0
- package/out/TSTransformer/nodes/statements/transformFunctionDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformFunctionDeclaration.js +68 -0
- package/out/TSTransformer/nodes/statements/transformIfStatement.d.ts +5 -0
- package/out/TSTransformer/nodes/statements/transformIfStatement.js +46 -0
- package/out/TSTransformer/nodes/statements/transformImportDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformImportDeclaration.js +98 -0
- package/out/TSTransformer/nodes/statements/transformImportEqualsDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformImportEqualsDeclaration.js +36 -0
- package/out/TSTransformer/nodes/statements/transformModuleDeclaration.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformModuleDeclaration.js +122 -0
- package/out/TSTransformer/nodes/statements/transformReturnStatement.d.ts +5 -0
- package/out/TSTransformer/nodes/statements/transformReturnStatement.js +74 -0
- package/out/TSTransformer/nodes/statements/transformStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformStatement.js +83 -0
- package/out/TSTransformer/nodes/statements/transformSwitchStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformSwitchStatement.js +105 -0
- package/out/TSTransformer/nodes/statements/transformThrowStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformThrowStatement.js +18 -0
- package/out/TSTransformer/nodes/statements/transformTryStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformTryStatement.js +148 -0
- package/out/TSTransformer/nodes/statements/transformVariableStatement.d.ts +8 -0
- package/out/TSTransformer/nodes/statements/transformVariableStatement.js +155 -0
- package/out/TSTransformer/nodes/statements/transformWhileStatement.d.ts +4 -0
- package/out/TSTransformer/nodes/statements/transformWhileStatement.js +30 -0
- package/out/TSTransformer/nodes/transformEntityName.d.ts +4 -0
- package/out/TSTransformer/nodes/transformEntityName.js +24 -0
- package/out/TSTransformer/nodes/transformInitializer.d.ts +4 -0
- package/out/TSTransformer/nodes/transformInitializer.js +22 -0
- package/out/TSTransformer/nodes/transformInterpolatedStringPart.d.ts +3 -0
- package/out/TSTransformer/nodes/transformInterpolatedStringPart.js +12 -0
- package/out/TSTransformer/nodes/transformLogical.d.ts +4 -0
- package/out/TSTransformer/nodes/transformLogical.js +103 -0
- package/out/TSTransformer/nodes/transformLogicalOrCoalescingAssignmentExpression.d.ts +5 -0
- package/out/TSTransformer/nodes/transformLogicalOrCoalescingAssignmentExpression.js +91 -0
- package/out/TSTransformer/nodes/transformMethodDeclaration.d.ts +5 -0
- package/out/TSTransformer/nodes/transformMethodDeclaration.js +82 -0
- package/out/TSTransformer/nodes/transformOptionalChain.d.ts +46 -0
- package/out/TSTransformer/nodes/transformOptionalChain.js +257 -0
- package/out/TSTransformer/nodes/transformParameters.d.ts +8 -0
- package/out/TSTransformer/nodes/transformParameters.js +104 -0
- package/out/TSTransformer/nodes/transformPropertyName.d.ts +4 -0
- package/out/TSTransformer/nodes/transformPropertyName.js +18 -0
- package/out/TSTransformer/nodes/transformSourceFile.d.ts +4 -0
- package/out/TSTransformer/nodes/transformSourceFile.js +171 -0
- package/out/TSTransformer/nodes/transformStatementList.d.ts +7 -0
- package/out/TSTransformer/nodes/transformStatementList.js +63 -0
- package/out/TSTransformer/nodes/transformWritable.d.ts +9 -0
- package/out/TSTransformer/nodes/transformWritable.js +49 -0
- package/out/TSTransformer/typeGuards.d.ts +5 -0
- package/out/TSTransformer/typeGuards.js +27 -0
- package/out/TSTransformer/types.d.ts +9 -0
- package/out/TSTransformer/types.js +3 -0
- package/out/TSTransformer/util/addIndexDiagnostics.d.ts +3 -0
- package/out/TSTransformer/util/addIndexDiagnostics.js +24 -0
- package/out/TSTransformer/util/addOneIfArrayType.d.ts +4 -0
- package/out/TSTransformer/util/addOneIfArrayType.js +14 -0
- package/out/TSTransformer/util/arrayBindingPatternContainsHoists.d.ts +3 -0
- package/out/TSTransformer/util/arrayBindingPatternContainsHoists.js +23 -0
- package/out/TSTransformer/util/arrayLikeExpressionContainsSpread.d.ts +2 -0
- package/out/TSTransformer/util/arrayLikeExpressionContainsSpread.js +17 -0
- package/out/TSTransformer/util/assertNever.d.ts +1 -0
- package/out/TSTransformer/util/assertNever.js +36 -0
- package/out/TSTransformer/util/assignment.d.ts +7 -0
- package/out/TSTransformer/util/assignment.js +48 -0
- package/out/TSTransformer/util/binding/getAccessorForBindingType.d.ts +6 -0
- package/out/TSTransformer/util/binding/getAccessorForBindingType.js +141 -0
- package/out/TSTransformer/util/binding/getTargetIdForBindingPattern.d.ts +4 -0
- package/out/TSTransformer/util/binding/getTargetIdForBindingPattern.js +15 -0
- package/out/TSTransformer/util/binding/objectAccessor.d.ts +4 -0
- package/out/TSTransformer/util/binding/objectAccessor.js +39 -0
- package/out/TSTransformer/util/bitwise.d.ts +6 -0
- package/out/TSTransformer/util/bitwise.js +67 -0
- package/out/TSTransformer/util/checkVariableHoist.d.ts +3 -0
- package/out/TSTransformer/util/checkVariableHoist.js +33 -0
- package/out/TSTransformer/util/cleanModuleName.d.ts +1 -0
- package/out/TSTransformer/util/cleanModuleName.js +7 -0
- package/out/TSTransformer/util/convertToIndexableExpression.d.ts +3 -0
- package/out/TSTransformer/util/convertToIndexableExpression.js +14 -0
- package/out/TSTransformer/util/createBinaryFromOperator.d.ts +4 -0
- package/out/TSTransformer/util/createBinaryFromOperator.js +54 -0
- package/out/TSTransformer/util/createGetService.d.ts +2 -0
- package/out/TSTransformer/util/createGetService.js +15 -0
- package/out/TSTransformer/util/createHoistDeclaration.d.ts +4 -0
- package/out/TSTransformer/util/createHoistDeclaration.js +20 -0
- package/out/TSTransformer/util/createImportExpression.d.ts +5 -0
- package/out/TSTransformer/util/createImportExpression.js +181 -0
- package/out/TSTransformer/util/createStringFromLiteral.d.ts +2 -0
- package/out/TSTransformer/util/createStringFromLiteral.js +27 -0
- package/out/TSTransformer/util/createTransformServices.d.ts +3 -0
- package/out/TSTransformer/util/createTransformServices.js +9 -0
- package/out/TSTransformer/util/createTruthinessChecks.d.ts +5 -0
- package/out/TSTransformer/util/createTruthinessChecks.js +50 -0
- package/out/TSTransformer/util/createTypeCheck.d.ts +2 -0
- package/out/TSTransformer/util/createTypeCheck.js +11 -0
- package/out/TSTransformer/util/ensureTransformOrder.d.ts +5 -0
- package/out/TSTransformer/util/ensureTransformOrder.js +39 -0
- package/out/TSTransformer/util/expressionChain.d.ts +3 -0
- package/out/TSTransformer/util/expressionChain.js +16 -0
- package/out/TSTransformer/util/expressionMightMutate.d.ts +4 -0
- package/out/TSTransformer/util/expressionMightMutate.js +57 -0
- package/out/TSTransformer/util/findConstructor.d.ts +4 -0
- package/out/TSTransformer/util/findConstructor.js +11 -0
- package/out/TSTransformer/util/fixupWhitespaceAndDecodeEntities.d.ts +1 -0
- package/out/TSTransformer/util/fixupWhitespaceAndDecodeEntities.js +306 -0
- package/out/TSTransformer/util/getAddIterableToArrayBuilder.d.ts +6 -0
- package/out/TSTransformer/util/getAddIterableToArrayBuilder.js +253 -0
- package/out/TSTransformer/util/getAssignableValue.d.ts +3 -0
- package/out/TSTransformer/util/getAssignableValue.js +15 -0
- package/out/TSTransformer/util/getConstantValueLiteral.d.ts +4 -0
- package/out/TSTransformer/util/getConstantValueLiteral.js +19 -0
- package/out/TSTransformer/util/getDeclaredVariables.d.ts +2 -0
- package/out/TSTransformer/util/getDeclaredVariables.js +37 -0
- package/out/TSTransformer/util/getExtendsNode.d.ts +2 -0
- package/out/TSTransformer/util/getExtendsNode.js +16 -0
- package/out/TSTransformer/util/getFlags.d.ts +1 -0
- package/out/TSTransformer/util/getFlags.js +13 -0
- package/out/TSTransformer/util/getKindName.d.ts +2 -0
- package/out/TSTransformer/util/getKindName.js +61 -0
- package/out/TSTransformer/util/getOriginalSymbolOfNode.d.ts +2 -0
- package/out/TSTransformer/util/getOriginalSymbolOfNode.js +15 -0
- package/out/TSTransformer/util/getSourceFileFromModuleSpecifier.d.ts +3 -0
- package/out/TSTransformer/util/getSourceFileFromModuleSpecifier.js +33 -0
- package/out/TSTransformer/util/getStatements.d.ts +2 -0
- package/out/TSTransformer/util/getStatements.js +11 -0
- package/out/TSTransformer/util/hasMultipleDefinitions.d.ts +2 -0
- package/out/TSTransformer/util/hasMultipleDefinitions.js +17 -0
- package/out/TSTransformer/util/isBlockedByTryStatement.d.ts +3 -0
- package/out/TSTransformer/util/isBlockedByTryStatement.js +17 -0
- package/out/TSTransformer/util/isMethod.d.ts +4 -0
- package/out/TSTransformer/util/isMethod.js +90 -0
- package/out/TSTransformer/util/isSymbolMutable.d.ts +3 -0
- package/out/TSTransformer/util/isSymbolMutable.js +24 -0
- package/out/TSTransformer/util/isSymbolOfValue.d.ts +2 -0
- package/out/TSTransformer/util/isSymbolOfValue.js +11 -0
- package/out/TSTransformer/util/isUsedAsStatement.d.ts +2 -0
- package/out/TSTransformer/util/isUsedAsStatement.js +23 -0
- package/out/TSTransformer/util/isValidMethodIndexWithoutCall.d.ts +3 -0
- package/out/TSTransformer/util/isValidMethodIndexWithoutCall.js +31 -0
- package/out/TSTransformer/util/offset.d.ts +2 -0
- package/out/TSTransformer/util/offset.js +44 -0
- package/out/TSTransformer/util/pointer.d.ts +13 -0
- package/out/TSTransformer/util/pointer.js +46 -0
- package/out/TSTransformer/util/spreadDestructuring/index.d.ts +9 -0
- package/out/TSTransformer/util/spreadDestructuring/index.js +45 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureArray.d.ts +3 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureArray.js +17 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureGenerator.d.ts +3 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureGenerator.js +33 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureMap.d.ts +3 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureMap.js +34 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureObject.d.ts +3 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureObject.js +41 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureSet.d.ts +3 -0
- package/out/TSTransformer/util/spreadDestructuring/spreadDestructureSet.js +28 -0
- package/out/TSTransformer/util/traversal.d.ts +7 -0
- package/out/TSTransformer/util/traversal.js +57 -0
- package/out/TSTransformer/util/types.d.ts +31 -0
- package/out/TSTransformer/util/types.js +259 -0
- package/out/TSTransformer/util/validateIdentifier.d.ts +3 -0
- package/out/TSTransformer/util/validateIdentifier.js +18 -0
- package/out/TSTransformer/util/validateMethodAssignment.d.ts +3 -0
- package/out/TSTransformer/util/validateMethodAssignment.js +81 -0
- package/out/TSTransformer/util/validateNotAny.d.ts +3 -0
- package/out/TSTransformer/util/validateNotAny.js +37 -0
- package/out/TSTransformer/util/valueToIdStr.d.ts +2 -0
- package/out/TSTransformer/util/valueToIdStr.js +29 -0
- package/out/TSTransformer/util/wrapExpressionStatement.d.ts +2 -0
- package/out/TSTransformer/util/wrapExpressionStatement.js +22 -0
- package/out/TSTransformer/util/wrapReturnIfLuaTuple.d.ts +4 -0
- package/out/TSTransformer/util/wrapReturnIfLuaTuple.js +56 -0
- package/out/TSTransformer/util/wrapStatementsAsGenerator.d.ts +4 -0
- package/out/TSTransformer/util/wrapStatementsAsGenerator.js +19 -0
- package/package.json +72 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { RbxPath } from "@roblox-ts/rojo-resolver";
|
|
2
|
+
import { SourceFileWithTextRange } from "./types";
|
|
3
|
+
import ts from "typescript";
|
|
4
|
+
export type DiagnosticFactory<T extends Array<unknown> = []> = {
|
|
5
|
+
(node: ts.Node | SourceFileWithTextRange, ...context: T): ts.DiagnosticWithLocation;
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function getDiagnosticId(diagnostic: ts.Diagnostic): number;
|
|
9
|
+
export declare const errors: {
|
|
10
|
+
noInvalidIdentifier: DiagnosticFactory<[]>;
|
|
11
|
+
noReservedIdentifier: DiagnosticFactory<[]>;
|
|
12
|
+
noReservedClassFields: DiagnosticFactory<[]>;
|
|
13
|
+
noClassMetamethods: DiagnosticFactory<[]>;
|
|
14
|
+
noForInStatement: DiagnosticFactory<[]>;
|
|
15
|
+
noLabeledStatement: DiagnosticFactory<[]>;
|
|
16
|
+
noDebuggerStatement: DiagnosticFactory<[]>;
|
|
17
|
+
noNullLiteral: DiagnosticFactory<[]>;
|
|
18
|
+
noPrivateIdentifier: DiagnosticFactory<[]>;
|
|
19
|
+
noTypeOfExpression: DiagnosticFactory<[]>;
|
|
20
|
+
noRegex: DiagnosticFactory<[]>;
|
|
21
|
+
noBigInt: DiagnosticFactory<[]>;
|
|
22
|
+
noAny: DiagnosticFactory<[]>;
|
|
23
|
+
noVar: DiagnosticFactory<[]>;
|
|
24
|
+
noGetterSetter: DiagnosticFactory<[]>;
|
|
25
|
+
noAutoAccessorModifiers: DiagnosticFactory<[]>;
|
|
26
|
+
noEqualsEquals: DiagnosticFactory<[]>;
|
|
27
|
+
noExclamationEquals: DiagnosticFactory<[]>;
|
|
28
|
+
noEnumMerging: DiagnosticFactory<[]>;
|
|
29
|
+
noNamespaceMerging: DiagnosticFactory<[]>;
|
|
30
|
+
noFunctionExpressionName: DiagnosticFactory<[]>;
|
|
31
|
+
noPrecedingSpreadElement: DiagnosticFactory<[]>;
|
|
32
|
+
noLuaTupleDestructureAssignmentExpression: DiagnosticFactory<[]>;
|
|
33
|
+
noExportAssignmentLet: DiagnosticFactory<[]>;
|
|
34
|
+
noGlobalThis: DiagnosticFactory<[]>;
|
|
35
|
+
noArguments: DiagnosticFactory<[]>;
|
|
36
|
+
noPrototype: DiagnosticFactory<[]>;
|
|
37
|
+
noRobloxSymbolInstanceof: DiagnosticFactory<[]>;
|
|
38
|
+
noNestedSpreadsInAssignmentPatterns: DiagnosticFactory<[]>;
|
|
39
|
+
noRestSpreadingOfRobloxTypes: DiagnosticFactory<[]>;
|
|
40
|
+
noNonNumberStringRelationOperator: DiagnosticFactory<[]>;
|
|
41
|
+
noInstanceMethodCollisions: DiagnosticFactory<[]>;
|
|
42
|
+
noStaticMethodCollisions: DiagnosticFactory<[]>;
|
|
43
|
+
noUnaryPlus: DiagnosticFactory<[]>;
|
|
44
|
+
noNonNumberUnaryMinus: DiagnosticFactory<[]>;
|
|
45
|
+
noAwaitForOf: DiagnosticFactory<[]>;
|
|
46
|
+
noAsyncGeneratorFunctions: DiagnosticFactory<[]>;
|
|
47
|
+
noNonStringModuleSpecifier: DiagnosticFactory<[]>;
|
|
48
|
+
noIterableIteration: DiagnosticFactory<[]>;
|
|
49
|
+
noMixedTypeCall: DiagnosticFactory<[]>;
|
|
50
|
+
noIndexWithoutCall: DiagnosticFactory<[]>;
|
|
51
|
+
noCommentDirectives: DiagnosticFactory<[]>;
|
|
52
|
+
noOptionalMacroCall: DiagnosticFactory<[]>;
|
|
53
|
+
noConstructorMacroWithoutNew: DiagnosticFactory<[]>;
|
|
54
|
+
noMacroExtends: DiagnosticFactory<[]>;
|
|
55
|
+
noMacroUnion: DiagnosticFactory<[]>;
|
|
56
|
+
noMacroObjectSpread: DiagnosticFactory<[]>;
|
|
57
|
+
noVarArgsMacroSpread: DiagnosticFactory<[]>;
|
|
58
|
+
noRangeMacroOutsideForOf: DiagnosticFactory<[]>;
|
|
59
|
+
noTupleMacroOutsideReturn: DiagnosticFactory<[]>;
|
|
60
|
+
noModuleSpecifierFile: DiagnosticFactory<[]>;
|
|
61
|
+
noInvalidModule: DiagnosticFactory<[]>;
|
|
62
|
+
noUnscopedModule: DiagnosticFactory<[]>;
|
|
63
|
+
noNonModuleImport: DiagnosticFactory<[]>;
|
|
64
|
+
noIsolatedImport: DiagnosticFactory<[]>;
|
|
65
|
+
noServerImport: DiagnosticFactory<[]>;
|
|
66
|
+
noPrecedingJsxSpreadElement: DiagnosticFactory<[]>;
|
|
67
|
+
expectedMethodGotFunction: DiagnosticFactory<[]>;
|
|
68
|
+
expectedFunctionGotMethod: DiagnosticFactory<[]>;
|
|
69
|
+
noRojoData: DiagnosticFactory<[path: string, isPackage: boolean]>;
|
|
70
|
+
noPackageImportWithoutScope: DiagnosticFactory<[path: string, rbxPath: RbxPath]>;
|
|
71
|
+
incorrectFileName: (originalFileName: string, suggestedFileName: string, fullPath: string) => ts.Diagnostic;
|
|
72
|
+
rojoPathInSrc: (partitionPath: string, suggestedPath: string) => ts.Diagnostic;
|
|
73
|
+
};
|
|
74
|
+
export declare const warnings: {
|
|
75
|
+
truthyChange: (checksStr: string) => DiagnosticFactory<[]>;
|
|
76
|
+
stringOffsetChange: (text: string) => DiagnosticFactory<[]>;
|
|
77
|
+
transformerNotFound: (name: string, err: unknown) => ts.Diagnostic;
|
|
78
|
+
runtimeLibUsedInReplicatedFirst: DiagnosticFactory<[]>;
|
|
79
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.warnings = exports.errors = void 0;
|
|
7
|
+
exports.getDiagnosticId = getDiagnosticId;
|
|
8
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
9
|
+
const createDiagnosticWithLocation_1 = require("./util/createDiagnosticWithLocation");
|
|
10
|
+
const createGithubLink_1 = require("./util/createGithubLink");
|
|
11
|
+
const createTextDiagnostic_1 = require("./util/createTextDiagnostic");
|
|
12
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
13
|
+
function suggestion(text) {
|
|
14
|
+
return "Suggestion: " + kleur_1.default.yellow(text);
|
|
15
|
+
}
|
|
16
|
+
let id = 0;
|
|
17
|
+
function diagnostic(category, ...messages) {
|
|
18
|
+
return diagnosticWithContext(category, undefined, ...messages);
|
|
19
|
+
}
|
|
20
|
+
function diagnosticWithContext(category, contextFormatter, ...messages) {
|
|
21
|
+
const result = (node, ...context) => {
|
|
22
|
+
if (category === typescript_1.default.DiagnosticCategory.Error &&
|
|
23
|
+
process.env.ROBLOX_TS_EXPECTED_DIAGNOSTIC_ID !== String(result.id)) {
|
|
24
|
+
debugger;
|
|
25
|
+
}
|
|
26
|
+
if (contextFormatter) {
|
|
27
|
+
messages.push(...contextFormatter(...context));
|
|
28
|
+
}
|
|
29
|
+
return (0, createDiagnosticWithLocation_1.createDiagnosticWithLocation)(result.id, messages.filter(v => v !== false).join("\n"), category, node);
|
|
30
|
+
};
|
|
31
|
+
result.id = id++;
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function diagnosticText(category, ...messages) {
|
|
35
|
+
return (0, createTextDiagnostic_1.createTextDiagnostic)(messages.filter(v => v !== false).join("\n"), category);
|
|
36
|
+
}
|
|
37
|
+
function error(...messages) {
|
|
38
|
+
return diagnostic(typescript_1.default.DiagnosticCategory.Error, ...messages);
|
|
39
|
+
}
|
|
40
|
+
function errorWithContext(contextFormatter, ...messages) {
|
|
41
|
+
return diagnosticWithContext(typescript_1.default.DiagnosticCategory.Error, contextFormatter, ...messages);
|
|
42
|
+
}
|
|
43
|
+
function errorText(...messages) {
|
|
44
|
+
return diagnosticText(typescript_1.default.DiagnosticCategory.Error, ...messages);
|
|
45
|
+
}
|
|
46
|
+
function warning(...messages) {
|
|
47
|
+
return diagnostic(typescript_1.default.DiagnosticCategory.Warning, ...messages);
|
|
48
|
+
}
|
|
49
|
+
function warningText(...messages) {
|
|
50
|
+
return diagnosticText(typescript_1.default.DiagnosticCategory.Warning, ...messages);
|
|
51
|
+
}
|
|
52
|
+
function getDiagnosticId(diagnostic) {
|
|
53
|
+
return diagnostic.id;
|
|
54
|
+
}
|
|
55
|
+
exports.errors = {
|
|
56
|
+
noInvalidIdentifier: error("Invalid Luau identifier!", "Luau identifiers must start with a letter and only contain letters, numbers, and underscores.", "Reserved Luau keywords cannot be used as identifiers."),
|
|
57
|
+
noReservedIdentifier: error("Cannot use identifier reserved for compiler internal usage."),
|
|
58
|
+
noReservedClassFields: error("Cannot use class field reserved for compiler internal usage."),
|
|
59
|
+
noClassMetamethods: error("Metamethods cannot be used in class definitions!"),
|
|
60
|
+
noForInStatement: error("for-in loop statements are not supported!"),
|
|
61
|
+
noLabeledStatement: error("labels are not supported!"),
|
|
62
|
+
noDebuggerStatement: error("`debugger` is not supported!"),
|
|
63
|
+
noNullLiteral: error("`null` is not supported!", suggestion("Use `undefined` instead.")),
|
|
64
|
+
noPrivateIdentifier: error("Private identifiers are not supported!"),
|
|
65
|
+
noTypeOfExpression: error("`typeof` operator is not supported!", suggestion("Use `typeIs(value, type)` or `typeOf(value)` instead.")),
|
|
66
|
+
noRegex: error("Regular expressions are not supported!"),
|
|
67
|
+
noBigInt: error("BigInt literals are not supported!"),
|
|
68
|
+
noAny: error("Using values of type `any` is not supported!", suggestion("Use `unknown` instead.")),
|
|
69
|
+
noVar: error("`var` keyword is not supported!", suggestion("Use `let` or `const` instead.")),
|
|
70
|
+
noGetterSetter: error("Getters and Setters are not supported!", (0, createGithubLink_1.issue)(457)),
|
|
71
|
+
noAutoAccessorModifiers: error("Getters and Setters are not supported!", "The `accessor` keyword requires generating get/set accessors", (0, createGithubLink_1.issue)(457)),
|
|
72
|
+
noEqualsEquals: error("operator `==` is not supported!", suggestion("Use `===` instead.")),
|
|
73
|
+
noExclamationEquals: error("operator `!=` is not supported!", suggestion("Use `!==` instead.")),
|
|
74
|
+
noEnumMerging: error("Enum merging is not supported!"),
|
|
75
|
+
noNamespaceMerging: error("Namespace merging is not supported!"),
|
|
76
|
+
noFunctionExpressionName: error("Function expression names are not supported!"),
|
|
77
|
+
noPrecedingSpreadElement: error("Spread element must come last in a list of arguments!"),
|
|
78
|
+
noLuaTupleDestructureAssignmentExpression: error("Cannot destructure LuaTuple<T> expression outside of an ExpressionStatement!"),
|
|
79
|
+
noExportAssignmentLet: error("Cannot use `export =` on a `let` variable!", suggestion("Use `const` instead.")),
|
|
80
|
+
noGlobalThis: error("`globalThis` is not supported!"),
|
|
81
|
+
noArguments: error("`arguments` is not supported!"),
|
|
82
|
+
noPrototype: error("`prototype` is not supported!"),
|
|
83
|
+
noRobloxSymbolInstanceof: error("The `instanceof` operator can only be used on roblox-ts classes!", suggestion('Use `typeIs(myThing, "TypeToCheck") instead')),
|
|
84
|
+
noNestedSpreadsInAssignmentPatterns: error("Nesting spreads in assignment patterns is not supported!"),
|
|
85
|
+
noRestSpreadingOfRobloxTypes: error("Operator `...` is not allowed on Roblox types!"),
|
|
86
|
+
noNonNumberStringRelationOperator: error("Relation operators can only be used on number or string types!"),
|
|
87
|
+
noInstanceMethodCollisions: error("Static methods cannot use the same name as instance methods!"),
|
|
88
|
+
noStaticMethodCollisions: error("Instance methods cannot use the same name as static methods!"),
|
|
89
|
+
noUnaryPlus: error("Unary `+` is not supported!", suggestion("Use `tonumber(x)` instead.")),
|
|
90
|
+
noNonNumberUnaryMinus: error("Unary `-` is only supported for number types!"),
|
|
91
|
+
noAwaitForOf: error("`await` is not supported in for-of loops!"),
|
|
92
|
+
noAsyncGeneratorFunctions: error("Async generator functions are not supported!"),
|
|
93
|
+
noNonStringModuleSpecifier: error("Module specifiers must be a string literal."),
|
|
94
|
+
noIterableIteration: error("Iterating on Iterable<T> is not supported! You must use a more specific type."),
|
|
95
|
+
noMixedTypeCall: error("Attempted to call a function with mixed types! All definitions must either be a method or a callback."),
|
|
96
|
+
noIndexWithoutCall: error("Cannot index a method without calling it!", suggestion("Use the form `() => a.b()` instead of `a.b`.")),
|
|
97
|
+
noCommentDirectives: error("Usage of `@ts-ignore`, `@ts-expect-error`, and `@ts-nocheck` are not supported!", "roblox-ts needs type and symbol info to compile correctly.", suggestion("Consider using type assertions or `declare` statements.")),
|
|
98
|
+
noOptionalMacroCall: error("Macro methods can not be optionally called!", suggestion("Macros always exist. Use a normal call.")),
|
|
99
|
+
noConstructorMacroWithoutNew: error("Cannot index a constructor macro without using the `new` operator!"),
|
|
100
|
+
noMacroExtends: error("Cannot extend from a macro class!", suggestion("Store an instance of the macro class in a property.")),
|
|
101
|
+
noMacroUnion: error("Macro cannot be applied to a union type!"),
|
|
102
|
+
noMacroObjectSpread: error("Macro classes cannot be used in an object spread!", suggestion("Did you mean to use an array spread? `[ ...exp ]`")),
|
|
103
|
+
noVarArgsMacroSpread: error("Macros which use variadic arguments do not support spread expressions!", (0, createGithubLink_1.issue)(1149)),
|
|
104
|
+
noRangeMacroOutsideForOf: error("$range() macro is only valid as an expression of a for-of loop!"),
|
|
105
|
+
noTupleMacroOutsideReturn: error("$tuple() macro is only valid as an expression of a return statement!"),
|
|
106
|
+
noModuleSpecifierFile: error("Could not find file for import. Did you forget to `npm install`?"),
|
|
107
|
+
noInvalidModule: error("You can only use npm scopes that are listed in your typeRoots."),
|
|
108
|
+
noUnscopedModule: error("You cannot use modules directly under node_modules."),
|
|
109
|
+
noNonModuleImport: error("Cannot import a non-ModuleScript!"),
|
|
110
|
+
noIsolatedImport: error("Attempted to import a file inside of an isolated container from outside!"),
|
|
111
|
+
noServerImport: error("Cannot import a server file from a shared or client location!", suggestion("Move the file you want to import to a shared location.")),
|
|
112
|
+
noPrecedingJsxSpreadElement: error("JSX spread expression must come last in children!"),
|
|
113
|
+
expectedMethodGotFunction: error("Attempted to assign non-method where method was expected."),
|
|
114
|
+
expectedFunctionGotMethod: error("Attempted to assign method where non-method was expected."),
|
|
115
|
+
noRojoData: errorWithContext((path, isPackage) => [
|
|
116
|
+
`Could not find Rojo data. There is no $path in your Rojo config that covers ${path}`,
|
|
117
|
+
isPackage && suggestion(`Did you forget to add a custom npm scope to your default.project.json?`),
|
|
118
|
+
]),
|
|
119
|
+
noPackageImportWithoutScope: errorWithContext((path, rbxPath) => [
|
|
120
|
+
`Imported package Roblox path is missing an npm scope!`,
|
|
121
|
+
`Package path: ${path}`,
|
|
122
|
+
`Roblox path: ${rbxPath.join(".")}`,
|
|
123
|
+
suggestion(`You might need to update your "node_modules" in default.project.json to match:
|
|
124
|
+
"node_modules": {
|
|
125
|
+
"$className": "Folder",
|
|
126
|
+
"@rbxts": {
|
|
127
|
+
"$path": "node_modules/@rbxts"
|
|
128
|
+
}
|
|
129
|
+
}`),
|
|
130
|
+
]),
|
|
131
|
+
incorrectFileName: (originalFileName, suggestedFileName, fullPath) => errorText(`Incorrect file name: \`${originalFileName}\`!`, `Full path: ${fullPath}`, suggestion(`Change \`${originalFileName}\` to \`${suggestedFileName}\`.`)),
|
|
132
|
+
rojoPathInSrc: (partitionPath, suggestedPath) => errorText(`Invalid Rojo configuration. $path fields should be relative to out directory.`, suggestion(`Change the value of $path from "${partitionPath}" to "${suggestedPath}".`)),
|
|
133
|
+
};
|
|
134
|
+
exports.warnings = {
|
|
135
|
+
truthyChange: (checksStr) => warning(`Value will be checked against ${checksStr}`),
|
|
136
|
+
stringOffsetChange: (text) => warning(`String macros no longer offset inputs: ${text}`),
|
|
137
|
+
transformerNotFound: (name, err) => warningText(`Transformer \`${name}\` was not found!`, "More info: " + err, suggestion("Did you forget to install the package?")),
|
|
138
|
+
runtimeLibUsedInReplicatedFirst: warning("This statement would generate a call to the runtime library. The runtime library should not be used from ReplicatedFirst."),
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LoggableError } from "./LoggableError";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
export declare class DiagnosticError extends LoggableError {
|
|
4
|
+
readonly diagnostics: ReadonlyArray<ts.Diagnostic>;
|
|
5
|
+
constructor(diagnostics: ReadonlyArray<ts.Diagnostic>);
|
|
6
|
+
toString(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiagnosticError = void 0;
|
|
4
|
+
const LoggableError_1 = require("./LoggableError");
|
|
5
|
+
const formatDiagnostics_1 = require("../util/formatDiagnostics");
|
|
6
|
+
class DiagnosticError extends LoggableError_1.LoggableError {
|
|
7
|
+
constructor(diagnostics) {
|
|
8
|
+
super();
|
|
9
|
+
this.diagnostics = diagnostics;
|
|
10
|
+
}
|
|
11
|
+
toString() {
|
|
12
|
+
return (0, formatDiagnostics_1.formatDiagnostics)(this.diagnostics);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.DiagnosticError = DiagnosticError;
|
|
16
|
+
//# sourceMappingURL=DiagnosticError.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoggableError = void 0;
|
|
4
|
+
const LogService_1 = require("../classes/LogService");
|
|
5
|
+
class LoggableError {
|
|
6
|
+
constructor() {
|
|
7
|
+
debugger;
|
|
8
|
+
}
|
|
9
|
+
log() {
|
|
10
|
+
LogService_1.LogService.writeLine(this.toString());
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.LoggableError = LoggableError;
|
|
14
|
+
//# sourceMappingURL=LoggableError.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectError = void 0;
|
|
4
|
+
const DiagnosticError_1 = require("./DiagnosticError");
|
|
5
|
+
const createTextDiagnostic_1 = require("../util/createTextDiagnostic");
|
|
6
|
+
class ProjectError extends DiagnosticError_1.DiagnosticError {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super([(0, createTextDiagnostic_1.createTextDiagnostic)(message)]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ProjectError = ProjectError;
|
|
12
|
+
//# sourceMappingURL=ProjectError.js.map
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PathTranslator } from "@roblox-ts/path-translator";
|
|
2
|
+
import { ProjectType } from "./constants";
|
|
3
|
+
import ts from "typescript";
|
|
4
|
+
export interface ProjectOptions {
|
|
5
|
+
includePath: string;
|
|
6
|
+
rojo: string | undefined;
|
|
7
|
+
type: ProjectType | undefined;
|
|
8
|
+
logTruthyChanges: boolean;
|
|
9
|
+
noInclude: boolean;
|
|
10
|
+
usePolling: boolean;
|
|
11
|
+
verbose: boolean;
|
|
12
|
+
watch: boolean;
|
|
13
|
+
writeOnlyChanged: boolean;
|
|
14
|
+
writeTransformedFiles: boolean;
|
|
15
|
+
optimizedLoops: boolean;
|
|
16
|
+
allowCommentDirectives: boolean;
|
|
17
|
+
luau: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ProjectData {
|
|
20
|
+
readonly isPackage: boolean;
|
|
21
|
+
readonly nodeModulesPath: string;
|
|
22
|
+
readonly projectOptions: ProjectOptions;
|
|
23
|
+
readonly projectPath: string;
|
|
24
|
+
readonly rojoConfigPath: string | undefined;
|
|
25
|
+
readonly tsConfigPath: string;
|
|
26
|
+
transformerWatcher?: TransformerWatcher;
|
|
27
|
+
readonly referencedProjects: Array<ReferencedProjectInfo>;
|
|
28
|
+
}
|
|
29
|
+
export interface ReferencedProjectInfo {
|
|
30
|
+
readonly tsConfigPath: string;
|
|
31
|
+
readonly rootDir: string;
|
|
32
|
+
readonly outDir: string;
|
|
33
|
+
}
|
|
34
|
+
export type GetProjectPathTranslator = (tsConfigPath: string) => PathTranslator;
|
|
35
|
+
export interface TransformerWatcher {
|
|
36
|
+
service: ts.LanguageService;
|
|
37
|
+
updateFile: (fileName: string, text: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface TransformerPluginConfig {
|
|
40
|
+
transform?: string;
|
|
41
|
+
import?: string;
|
|
42
|
+
type?: "program" | "config" | "checker" | "raw" | "compilerOptions";
|
|
43
|
+
after?: boolean;
|
|
44
|
+
afterDeclarations?: boolean;
|
|
45
|
+
[options: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export interface SourceFileWithTextRange {
|
|
48
|
+
sourceFile: ts.SourceFile;
|
|
49
|
+
range: ts.ReadonlyTextRange;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assert(value: unknown, message?: string): asserts value;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assert = assert;
|
|
4
|
+
function assert(value, message) {
|
|
5
|
+
if (!value) {
|
|
6
|
+
debugger;
|
|
7
|
+
throw new Error(`Assertion Failed! ${message !== null && message !== void 0 ? message : ""}` +
|
|
8
|
+
"\nThis is a compiler bug! Please submit a bug report here:" +
|
|
9
|
+
"\nhttps://github.com/roblox-ts/roblox-ts/issues");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=assert.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.benchmarkSync = benchmarkSync;
|
|
4
|
+
exports.benchmarkIfVerbose = benchmarkIfVerbose;
|
|
5
|
+
exports.benchmark = benchmark;
|
|
6
|
+
const LogService_1 = require("../classes/LogService");
|
|
7
|
+
function benchmarkStart(name) {
|
|
8
|
+
LogService_1.LogService.write(`${name}`);
|
|
9
|
+
return Date.now();
|
|
10
|
+
}
|
|
11
|
+
function benchmarkEnd(startTime) {
|
|
12
|
+
LogService_1.LogService.write(` ( ${Date.now() - startTime} ms )\n`);
|
|
13
|
+
}
|
|
14
|
+
function benchmarkSync(name, callback) {
|
|
15
|
+
const startTime = benchmarkStart(name);
|
|
16
|
+
callback();
|
|
17
|
+
benchmarkEnd(startTime);
|
|
18
|
+
}
|
|
19
|
+
function benchmarkIfVerbose(name, callback) {
|
|
20
|
+
if (LogService_1.LogService.verbose) {
|
|
21
|
+
benchmarkSync(name, callback);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
callback();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function benchmark(name, callback) {
|
|
28
|
+
const startTime = benchmarkStart(name);
|
|
29
|
+
await callback();
|
|
30
|
+
benchmarkEnd(startTime);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=benchmark.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDiagnosticWithLocation = createDiagnosticWithLocation;
|
|
4
|
+
function createDiagnosticWithLocation(id, messageText, category, node) {
|
|
5
|
+
const code = " roblox-ts";
|
|
6
|
+
if ("kind" in node) {
|
|
7
|
+
return {
|
|
8
|
+
category,
|
|
9
|
+
code,
|
|
10
|
+
messageText,
|
|
11
|
+
id,
|
|
12
|
+
file: node.getSourceFile(),
|
|
13
|
+
start: node.getStart(),
|
|
14
|
+
length: node.getWidth(),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return {
|
|
19
|
+
category,
|
|
20
|
+
code,
|
|
21
|
+
messageText,
|
|
22
|
+
id,
|
|
23
|
+
file: node.sourceFile,
|
|
24
|
+
start: node.range.pos,
|
|
25
|
+
length: node.range.end,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=createDiagnosticWithLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function issue(id: number): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.issue = issue;
|
|
7
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
8
|
+
const REPO_URL = "https://github.com/roblox-ts/roblox-ts";
|
|
9
|
+
function issue(id) {
|
|
10
|
+
return "More information: " + kleur_1.default.grey(`${REPO_URL}/issues/${id}`);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=createGithubLink.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createTextDiagnostic = createTextDiagnostic;
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
+
function createTextDiagnostic(messageText, category = typescript_1.default.DiagnosticCategory.Error) {
|
|
9
|
+
return {
|
|
10
|
+
category,
|
|
11
|
+
code: " roblox-ts",
|
|
12
|
+
file: undefined,
|
|
13
|
+
messageText,
|
|
14
|
+
start: undefined,
|
|
15
|
+
length: undefined,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=createTextDiagnostic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findAncestorDir(dirs: Array<string>): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.findAncestorDir = findAncestorDir;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
function findAncestorDir(dirs) {
|
|
9
|
+
dirs = dirs.map(path_1.default.normalize).map(v => (v.endsWith(path_1.default.sep) ? v : v + path_1.default.sep));
|
|
10
|
+
let currentDir = dirs[0];
|
|
11
|
+
while (!dirs.every(v => v.startsWith(currentDir))) {
|
|
12
|
+
currentDir = path_1.default.join(currentDir, "..");
|
|
13
|
+
}
|
|
14
|
+
return currentDir;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=findAncestorDir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findLastIndex<T>(array: ReadonlyArray<T>, callback: (value: T) => boolean): number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findLastIndex = findLastIndex;
|
|
4
|
+
function findLastIndex(array, callback) {
|
|
5
|
+
for (let i = array.length - 1; i >= 0; i--) {
|
|
6
|
+
if (callback(array[i])) {
|
|
7
|
+
return i;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return -1;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=findLastIndex.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatDiagnostics = formatDiagnostics;
|
|
7
|
+
const os_1 = require("os");
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
function createFormatDiagnosticsHost() {
|
|
10
|
+
return {
|
|
11
|
+
getCurrentDirectory: () => process.cwd(),
|
|
12
|
+
getCanonicalFileName: fileName => fileName,
|
|
13
|
+
getNewLine: () => os_1.EOL,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function formatDiagnostics(diagnostics) {
|
|
17
|
+
return typescript_1.default.formatDiagnosticsWithColorAndContext(diagnostics, createFormatDiagnosticsHost());
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=formatDiagnostics.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
var _a, _b;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getCanonicalFileName = void 0;
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
exports.getCanonicalFileName = typescript_1.default.createGetCanonicalFileName((_b = (_a = typescript_1.default.sys) === null || _a === void 0 ? void 0 : _a.useCaseSensitiveFileNames) !== null && _b !== void 0 ? _b : true);
|
|
10
|
+
//# sourceMappingURL=getCanonicalFileName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getOrSetDefault<K, V>(map: Map<K, V>, key: K, getDefaultValue: () => V): V;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOrSetDefault = getOrSetDefault;
|
|
4
|
+
function getOrSetDefault(map, key, getDefaultValue) {
|
|
5
|
+
let value = map.get(key);
|
|
6
|
+
if (value === undefined) {
|
|
7
|
+
value = getDefaultValue();
|
|
8
|
+
map.set(key, value);
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=getOrSetDefault.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRootDirs = getRootDirs;
|
|
4
|
+
const assert_1 = require("./assert");
|
|
5
|
+
function getRootDirs(compilerOptions) {
|
|
6
|
+
const rootDirs = compilerOptions.rootDir ? [compilerOptions.rootDir] : compilerOptions.rootDirs;
|
|
7
|
+
(0, assert_1.assert)(rootDirs);
|
|
8
|
+
return rootDirs;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=getRootDirs.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hasErrors = hasErrors;
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
+
function hasErrors(diagnostics) {
|
|
9
|
+
return diagnostics.some(d => d.category === typescript_1.default.DiagnosticCategory.Error);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hasErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPathDescendantOf(filePath: string, dirPath: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isPathDescendantOf = isPathDescendantOf;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
function isPathDescendantOf(filePath, dirPath) {
|
|
9
|
+
return dirPath === filePath || !path_1.default.relative(dirPath, filePath).startsWith("..");
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=isPathDescendantOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function realPathExistsSync(fsPath: string): string | undefined;
|