-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The following code works:
export const someObjectLiteral = {
objectLiteralThrow({ someArg}: { someArg: string}) {
throw new Error('hi khue')
},
nestedObjectLiteral: {
nestedObjectLiteralThrow: () => {
throw new Error('hi khue')
},
},
}
export const callToLiteral = () => {
someObjectLiteral.nestedObjectLiteral.nestedObjectLiteralThrow()
SomeObject.someExampleThrow()
}However the following code does not:
import { someObjectLiteral } from './something'
export const callToLiteral = () => {
someObjectLiteral.nestedObjectLiteral.nestedObjectLiteralThrow()
SomeObject.someExampleThrow()
}Most likely need to revisit the import_usage_finder.rs implementation to track nested properties as it visits the AST.
https://github.com/michaelangeloio/does-it-throw/blob/main/crates/does-it-throw/src/import_usage_finder.rs