@flint.fyi/typescript-language 0.18.2 → 0.18.4

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.
Files changed (70) hide show
  1. package/lib/collectReferencedFilePaths.d.ts +0 -1
  2. package/lib/collectReferencedFilePaths.js +1 -3
  3. package/lib/convertTypeScriptDiagnosticToLanguageReport.d.ts +2 -3
  4. package/lib/convertTypeScriptDiagnosticToLanguageReport.js +3 -4
  5. package/lib/createTypeScriptServerHost.d.ts +1 -2
  6. package/lib/createTypeScriptServerHost.js +1 -3
  7. package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +1 -2
  8. package/lib/directives/parseDirectivesFromTypeScriptFile.js +2 -4
  9. package/lib/getFirstEnumValues.d.ts +0 -1
  10. package/lib/getFirstEnumValues.js +0 -2
  11. package/lib/getTSNodeRange.d.ts +2 -3
  12. package/lib/getTSNodeRange.js +0 -2
  13. package/lib/getTypeScriptFileCacheImpacts.d.ts +0 -1
  14. package/lib/getTypeScriptFileCacheImpacts.js +5 -3
  15. package/lib/index.d.ts +8 -3
  16. package/lib/index.js +5 -1
  17. package/lib/language.d.ts +393 -201
  18. package/lib/language.js +2 -4
  19. package/lib/nodes.d.ts +1 -2
  20. package/lib/normalizeRange.d.ts +0 -1
  21. package/lib/normalizeRange.js +0 -2
  22. package/lib/orderTypeScriptFilePaths.d.ts +0 -1
  23. package/lib/orderTypeScriptFilePaths.js +0 -2
  24. package/lib/package.js +1 -3
  25. package/lib/scope/identifierReferences.d.ts +3 -0
  26. package/lib/scope/identifierReferences.js +89 -0
  27. package/lib/scope/scopeManager.d.ts +14 -0
  28. package/lib/scope/scopeManager.js +153 -0
  29. package/lib/scope/scopes.d.ts +7 -0
  30. package/lib/scope/scopes.js +64 -0
  31. package/lib/scope/types.d.ts +45 -0
  32. package/lib/types/ast.d.ts +2 -2
  33. package/lib/types/checker.d.ts +1 -2
  34. package/lib/utils/containsGlobalDeclarations.d.ts +6 -0
  35. package/lib/utils/containsGlobalDeclarations.js +17 -0
  36. package/lib/utils/createRuleTesterTSConfig.d.ts +1 -2
  37. package/lib/utils/createRuleTesterTSConfig.js +0 -2
  38. package/lib/utils/declarationIncludesGlobal.d.ts +1 -2
  39. package/lib/utils/declarationIncludesGlobal.js +0 -2
  40. package/lib/utils/declarationsIncludeGlobal.d.ts +0 -1
  41. package/lib/utils/declarationsIncludeGlobal.js +0 -2
  42. package/lib/utils/forEachChild.d.ts +7 -0
  43. package/lib/utils/forEachChild.js +5 -0
  44. package/lib/utils/getDeclarationsIfGlobal.d.ts +2 -5
  45. package/lib/utils/getDeclarationsIfGlobal.js +0 -2
  46. package/lib/utils/getModifyingReferences.d.ts +2 -7
  47. package/lib/utils/getModifyingReferences.js +5 -27
  48. package/lib/utils/hasSameTokens.d.ts +1 -2
  49. package/lib/utils/hasSameTokens.js +0 -2
  50. package/lib/utils/isBuiltinArrayMethod.d.ts +1 -2
  51. package/lib/utils/isBuiltinArrayMethod.js +0 -2
  52. package/lib/utils/isFunction.d.ts +1 -2
  53. package/lib/utils/isFunction.js +0 -2
  54. package/lib/utils/isGlobalDeclaration.d.ts +1 -2
  55. package/lib/utils/isGlobalDeclaration.js +0 -2
  56. package/lib/utils/isGlobalDeclarationOfName.d.ts +1 -2
  57. package/lib/utils/isGlobalDeclarationOfName.js +0 -2
  58. package/lib/utils/isGlobalVariable.d.ts +1 -2
  59. package/lib/utils/isGlobalVariable.js +0 -2
  60. package/lib/utils/isInlineArrayCreation.d.ts +1 -2
  61. package/lib/utils/isInlineArrayCreation.js +0 -2
  62. package/lib/utils/isStaticString.d.ts +5 -0
  63. package/lib/utils/isStaticString.js +7 -0
  64. package/lib/utils/isStringRawNoSubstitution.d.ts +7 -0
  65. package/lib/utils/isStringRawNoSubstitution.js +9 -0
  66. package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +1 -2
  67. package/lib/utils/unwrapParentParenthesizedExpressions.js +0 -2
  68. package/lib/utils/unwrapParenthesizedNode.d.ts +1 -2
  69. package/lib/utils/unwrapParenthesizedNode.js +0 -2
  70. package/package.json +5 -6
@@ -4,5 +4,3 @@ function isFunction(node, typeChecker) {
4
4
  }
5
5
  //#endregion
6
6
  export { isFunction };
7
-
8
- //# sourceMappingURL=isFunction.js.map
@@ -3,5 +3,4 @@ import { Checker } from "../types/checker.js";
3
3
  //#region src/utils/isGlobalDeclaration.d.ts
4
4
  declare function isGlobalDeclaration(node: Expression, typeChecker: Checker): boolean;
5
5
  //#endregion
6
- export { isGlobalDeclaration };
7
- //# sourceMappingURL=isGlobalDeclaration.d.ts.map
6
+ export { isGlobalDeclaration };
@@ -5,5 +5,3 @@ function isGlobalDeclaration(node, typeChecker) {
5
5
  }
6
6
  //#endregion
7
7
  export { isGlobalDeclaration };
8
-
9
- //# sourceMappingURL=isGlobalDeclaration.js.map
@@ -7,5 +7,4 @@ import ts from "typescript";
7
7
  */
8
8
  declare function isGlobalDeclarationOfName(node: ts.Node, name: string, typeChecker: Checker): boolean;
9
9
  //#endregion
10
- export { isGlobalDeclarationOfName };
11
- //# sourceMappingURL=isGlobalDeclarationOfName.d.ts.map
10
+ export { isGlobalDeclarationOfName };
@@ -19,5 +19,3 @@ function isDeclarationOfName(node, name) {
19
19
  }
20
20
  //#endregion
21
21
  export { isGlobalDeclarationOfName };
22
-
23
- //# sourceMappingURL=isGlobalDeclarationOfName.js.map
@@ -9,5 +9,4 @@ import { Checker } from "../types/checker.js";
9
9
  */
10
10
  declare function isGlobalVariable(node: Expression, typeChecker: Checker): boolean;
11
11
  //#endregion
12
- export { isGlobalVariable };
13
- //# sourceMappingURL=isGlobalVariable.d.ts.map
12
+ export { isGlobalVariable };
@@ -15,5 +15,3 @@ function isGlobalVariable(node, typeChecker) {
15
15
  }
16
16
  //#endregion
17
17
  export { isGlobalVariable };
18
-
19
- //# sourceMappingURL=isGlobalVariable.js.map
@@ -8,5 +8,4 @@ import * as ts$1 from "typescript";
8
8
  */
9
9
  declare function isInlineArrayCreation(node: ts$1.Expression): boolean;
10
10
  //#endregion
11
- export { isInlineArrayCreation };
12
- //# sourceMappingURL=isInlineArrayCreation.d.ts.map
11
+ export { isInlineArrayCreation };
@@ -41,5 +41,3 @@ function isInlineArrayCreation(node) {
41
41
  }
42
42
  //#endregion
43
43
  export { isInlineArrayCreation };
44
-
45
- //# sourceMappingURL=isInlineArrayCreation.js.map
@@ -0,0 +1,5 @@
1
+ import { Expression, NoSubstitutionTemplateLiteral, StringLiteral } from "../types/ast.js";
2
+ //#region src/utils/isStaticString.d.ts
3
+ declare function isStaticString(node: Expression): node is NoSubstitutionTemplateLiteral | StringLiteral;
4
+ //#endregion
5
+ export { isStaticString };
@@ -0,0 +1,7 @@
1
+ import { SyntaxKind } from "typescript";
2
+ //#region src/utils/isStaticString.ts
3
+ function isStaticString(node) {
4
+ return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
5
+ }
6
+ //#endregion
7
+ export { isStaticString };
@@ -0,0 +1,7 @@
1
+ import { Expression, NoSubstitutionTemplateLiteral, TaggedTemplateExpression } from "../types/ast.js";
2
+ //#region src/utils/isStringRawNoSubstitution.d.ts
3
+ declare function isStringRawNoSubstitution(node: Expression): node is TaggedTemplateExpression & {
4
+ template: NoSubstitutionTemplateLiteral;
5
+ };
6
+ //#endregion
7
+ export { isStringRawNoSubstitution };
@@ -0,0 +1,9 @@
1
+ import { SyntaxKind } from "typescript";
2
+ //#region src/utils/isStringRawNoSubstitution.ts
3
+ function isStringRawNoSubstitution(node) {
4
+ if (node.kind !== SyntaxKind.TaggedTemplateExpression) return false;
5
+ const tag = node.tag;
6
+ return tag.kind === SyntaxKind.PropertyAccessExpression && tag.expression.kind === SyntaxKind.Identifier && tag.expression.text === "String" && tag.name.kind === SyntaxKind.Identifier && tag.name.text === "raw" && node.template.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
7
+ }
8
+ //#endregion
9
+ export { isStringRawNoSubstitution };
@@ -3,5 +3,4 @@ import { BinaryExpression, LeftHandSideExpressionParent, ParenthesizedExpression
3
3
  //#region src/utils/unwrapParentParenthesizedExpressions.d.ts
4
4
  declare function unwrapParentParenthesizedExpressions(node: BinaryExpression | ParenthesizedExpression): LeftHandSideExpressionParent;
5
5
  //#endregion
6
- export { unwrapParentParenthesizedExpressions };
7
- //# sourceMappingURL=unwrapParentParenthesizedExpressions.d.ts.map
6
+ export { unwrapParentParenthesizedExpressions };
@@ -5,5 +5,3 @@ function unwrapParentParenthesizedExpressions(node) {
5
5
  }
6
6
  //#endregion
7
7
  export { unwrapParentParenthesizedExpressions };
8
-
9
- //# sourceMappingURL=unwrapParentParenthesizedExpressions.js.map
@@ -3,5 +3,4 @@ import { AnyNode } from "../types/ast.js";
3
3
  //#region src/utils/unwrapParenthesizedNode.d.ts
4
4
  declare function unwrapParenthesizedNode(node: AnyNode): AnyNode;
5
5
  //#endregion
6
- export { unwrapParenthesizedNode };
7
- //# sourceMappingURL=unwrapParenthesizedNode.d.ts.map
6
+ export { unwrapParenthesizedNode };
@@ -5,5 +5,3 @@ function unwrapParenthesizedNode(node) {
5
5
  }
6
6
  //#endregion
7
7
  export { unwrapParenthesizedNode };
8
-
9
- //# sourceMappingURL=unwrapParenthesizedNode.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/typescript-language",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "description": "[Experimental] TypeScript language for Flint.",
5
5
  "homepage": "https://flint.fyi",
6
6
  "repository": {
@@ -19,8 +19,7 @@
19
19
  ".": "./lib/index.js"
20
20
  },
21
21
  "files": [
22
- "lib/",
23
- "!lib/**/*.map"
22
+ "lib/"
24
23
  ],
25
24
  "dependencies": {
26
25
  "@typescript-eslint/project-service": "^8.53.0",
@@ -28,11 +27,11 @@
28
27
  "pathe": "^2.0.3",
29
28
  "ts-api-utils": "^2.4.0",
30
29
  "typescript": "^5.9.0 || ^6.0.0",
31
- "@flint.fyi/core": "^0.22.0",
32
- "@flint.fyi/utils": "^0.14.1"
30
+ "@flint.fyi/utils": "^0.14.1",
31
+ "@flint.fyi/core": "^0.23.1"
33
32
  },
34
33
  "devDependencies": {
35
- "tsdown": "0.21.0",
34
+ "tsdown": "0.22.2",
36
35
  "vitest": "4.1.0"
37
36
  },
38
37
  "engines": {