@r_masseater/msch 0.28.0 → 0.28.2
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/dist/cli.mjs +3 -1
- package/dist/cli.mjs.map +1 -1
- package/package.json +2 -2
- package/skills/msch-checks/SKILL.md +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -2428,9 +2428,11 @@ const isModuleScope = (node) => {
|
|
|
2428
2428
|
if (isSourceFile(parent)) return true;
|
|
2429
2429
|
return !isSignatureDeclaration(parent) && isModuleScope(parent);
|
|
2430
2430
|
};
|
|
2431
|
+
const isModuleConstant = (node) => isVariableDeclaration(node.parent) && node.parent.initializer === node && isModuleScope(node.parent);
|
|
2431
2432
|
const isDefinition = (node) => {
|
|
2432
2433
|
const { parent } = node;
|
|
2433
|
-
|
|
2434
|
+
if (isPropertyAssignment(parent)) return parent.initializer === node && isObjectLiteralExpression(parent.parent) && isModuleConstant(parent.parent);
|
|
2435
|
+
return isModuleConstant(node);
|
|
2434
2436
|
};
|
|
2435
2437
|
const isTyped = (checker) => (node) => Option.fromUndefinedOr(checker.getContextualType(node)).pipe(Option.flatMap(finiteValuesOf(checker)), Option.isSome);
|
|
2436
2438
|
const specifierOf = (statement) => {
|