typescript-to-lua
Advanced tools
Comparing version 0.39.1 to 0.39.2
@@ -114,4 +114,7 @@ "use strict"; | ||
function getSourcePosition(sourceNode) { | ||
if (sourceNode.getSourceFile() !== undefined && sourceNode.pos >= 0) { | ||
const { line, character } = ts.getLineAndCharacterOfPosition(sourceNode.getSourceFile(), sourceNode.pos + sourceNode.getLeadingTriviaWidth()); | ||
var _a; | ||
const parseTreeNode = (_a = ts.getParseTreeNode(sourceNode)) !== null && _a !== void 0 ? _a : sourceNode; | ||
const sourceFile = parseTreeNode.getSourceFile(); | ||
if (sourceFile !== undefined && parseTreeNode.pos >= 0) { | ||
const { line, character } = ts.getLineAndCharacterOfPosition(sourceFile, parseTreeNode.pos + parseTreeNode.getLeadingTriviaWidth()); | ||
return { line, column: character }; | ||
@@ -118,0 +121,0 @@ } |
@@ -45,3 +45,5 @@ "use strict"; | ||
function isStandardLibraryDeclaration(context, declaration) { | ||
const sourceFile = declaration.getSourceFile(); | ||
var _a; | ||
const parseTreeNode = (_a = ts.getParseTreeNode(declaration)) !== null && _a !== void 0 ? _a : declaration; | ||
const sourceFile = parseTreeNode.getSourceFile(); | ||
if (!sourceFile) { | ||
@@ -48,0 +50,0 @@ return false; |
{ | ||
"name": "typescript-to-lua", | ||
"version": "0.39.1", | ||
"version": "0.39.2", | ||
"description": "A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/TypeScriptToLua/TypeScriptToLua", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
726787
11028