@waiting/shared-types-dev
Advanced tools
Comparing version 12.0.1 to 12.0.2
@@ -84,4 +84,14 @@ /* eslint-disable max-len */ | ||
const callerInfo = getCallerStack(2, true); | ||
const file = createSourceFile(callerInfo.path); | ||
assert(file); | ||
let file; | ||
try { | ||
file = createSourceFile(callerInfo.path); | ||
} | ||
catch (ex) { | ||
console.error('computeCallExpressionToLiteralObj() failed: ', { | ||
funcName, | ||
callerInfo, | ||
}); | ||
throw ex; | ||
} | ||
assert(file, 'createSourceFile() failed'); | ||
const vinfo = retrieveVarInfoFromCallExpressionCallerInfo(callerInfo, funcName, file); | ||
@@ -88,0 +98,0 @@ if (!vinfo) { |
{ | ||
"name": "@waiting/shared-types-dev", | ||
"author": "waiting", | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"description": "shared typescript types devel", | ||
@@ -69,3 +69,3 @@ "private": false, | ||
}, | ||
"gitHead": "99dadddc3cacb112fd370a311c7ffaf44d067b6c" | ||
"gitHead": "a487807775aeb7f163379812b0a1bfbb4faeb149" | ||
} |
@@ -5,3 +5,3 @@ /* eslint-disable max-len */ | ||
import { getCallerStack } from '@waiting/shared-core' | ||
import { SyntaxKind } from 'ts-morph' | ||
import { SourceFile, SyntaxKind } from 'ts-morph' | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
@@ -146,4 +146,14 @@ import ts from 'typescript' | ||
const callerInfo = getCallerStack(2, true) | ||
const file = createSourceFile(callerInfo.path) | ||
assert(file) | ||
let file: SourceFile | ||
try { | ||
file = createSourceFile(callerInfo.path) | ||
} | ||
catch (ex) { | ||
console.error('computeCallExpressionToLiteralObj() failed: ', { | ||
funcName, | ||
callerInfo, | ||
}) | ||
throw ex | ||
} | ||
assert(file, 'createSourceFile() failed') | ||
@@ -150,0 +160,0 @@ const vinfo = retrieveVarInfoFromCallExpressionCallerInfo(callerInfo, funcName, file) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
177843
3162