@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.
- package/lib/collectReferencedFilePaths.d.ts +0 -1
- package/lib/collectReferencedFilePaths.js +1 -3
- package/lib/convertTypeScriptDiagnosticToLanguageReport.d.ts +2 -3
- package/lib/convertTypeScriptDiagnosticToLanguageReport.js +3 -4
- package/lib/createTypeScriptServerHost.d.ts +1 -2
- package/lib/createTypeScriptServerHost.js +1 -3
- package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +1 -2
- package/lib/directives/parseDirectivesFromTypeScriptFile.js +2 -4
- package/lib/getFirstEnumValues.d.ts +0 -1
- package/lib/getFirstEnumValues.js +0 -2
- package/lib/getTSNodeRange.d.ts +2 -3
- package/lib/getTSNodeRange.js +0 -2
- package/lib/getTypeScriptFileCacheImpacts.d.ts +0 -1
- package/lib/getTypeScriptFileCacheImpacts.js +5 -3
- package/lib/index.d.ts +8 -3
- package/lib/index.js +5 -1
- package/lib/language.d.ts +393 -201
- package/lib/language.js +2 -4
- package/lib/nodes.d.ts +1 -2
- package/lib/normalizeRange.d.ts +0 -1
- package/lib/normalizeRange.js +0 -2
- package/lib/orderTypeScriptFilePaths.d.ts +0 -1
- package/lib/orderTypeScriptFilePaths.js +0 -2
- package/lib/package.js +1 -3
- package/lib/scope/identifierReferences.d.ts +3 -0
- package/lib/scope/identifierReferences.js +89 -0
- package/lib/scope/scopeManager.d.ts +14 -0
- package/lib/scope/scopeManager.js +153 -0
- package/lib/scope/scopes.d.ts +7 -0
- package/lib/scope/scopes.js +64 -0
- package/lib/scope/types.d.ts +45 -0
- package/lib/types/ast.d.ts +2 -2
- package/lib/types/checker.d.ts +1 -2
- package/lib/utils/containsGlobalDeclarations.d.ts +6 -0
- package/lib/utils/containsGlobalDeclarations.js +17 -0
- package/lib/utils/createRuleTesterTSConfig.d.ts +1 -2
- package/lib/utils/createRuleTesterTSConfig.js +0 -2
- package/lib/utils/declarationIncludesGlobal.d.ts +1 -2
- package/lib/utils/declarationIncludesGlobal.js +0 -2
- package/lib/utils/declarationsIncludeGlobal.d.ts +0 -1
- package/lib/utils/declarationsIncludeGlobal.js +0 -2
- package/lib/utils/forEachChild.d.ts +7 -0
- package/lib/utils/forEachChild.js +5 -0
- package/lib/utils/getDeclarationsIfGlobal.d.ts +2 -5
- package/lib/utils/getDeclarationsIfGlobal.js +0 -2
- package/lib/utils/getModifyingReferences.d.ts +2 -7
- package/lib/utils/getModifyingReferences.js +5 -27
- package/lib/utils/hasSameTokens.d.ts +1 -2
- package/lib/utils/hasSameTokens.js +0 -2
- package/lib/utils/isBuiltinArrayMethod.d.ts +1 -2
- package/lib/utils/isBuiltinArrayMethod.js +0 -2
- package/lib/utils/isFunction.d.ts +1 -2
- package/lib/utils/isFunction.js +0 -2
- package/lib/utils/isGlobalDeclaration.d.ts +1 -2
- package/lib/utils/isGlobalDeclaration.js +0 -2
- package/lib/utils/isGlobalDeclarationOfName.d.ts +1 -2
- package/lib/utils/isGlobalDeclarationOfName.js +0 -2
- package/lib/utils/isGlobalVariable.d.ts +1 -2
- package/lib/utils/isGlobalVariable.js +0 -2
- package/lib/utils/isInlineArrayCreation.d.ts +1 -2
- package/lib/utils/isInlineArrayCreation.js +0 -2
- package/lib/utils/isStaticString.d.ts +5 -0
- package/lib/utils/isStaticString.js +7 -0
- package/lib/utils/isStringRawNoSubstitution.d.ts +7 -0
- package/lib/utils/isStringRawNoSubstitution.js +9 -0
- package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +1 -2
- package/lib/utils/unwrapParentParenthesizedExpressions.js +0 -2
- package/lib/utils/unwrapParenthesizedNode.d.ts +1 -2
- package/lib/utils/unwrapParenthesizedNode.js +0 -2
- package/package.json +5 -6
package/lib/utils/isFunction.js
CHANGED
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flint.fyi/typescript-language",
|
|
3
|
-
"version": "0.18.
|
|
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/
|
|
32
|
-
"@flint.fyi/
|
|
30
|
+
"@flint.fyi/utils": "^0.14.1",
|
|
31
|
+
"@flint.fyi/core": "^0.23.1"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
|
-
"tsdown": "0.
|
|
34
|
+
"tsdown": "0.22.2",
|
|
36
35
|
"vitest": "4.1.0"
|
|
37
36
|
},
|
|
38
37
|
"engines": {
|