@typescript-eslint/type-utils 8.0.0-alpha.34 → 8.0.0-alpha.36
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/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/getTokenAtPosition.d.ts +0 -3
- package/dist/getTokenAtPosition.d.ts.map +0 -1
- package/dist/getTokenAtPosition.js +0 -52
- package/dist/getTokenAtPosition.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from './getConstrainedTypeAtLocation';
|
|
|
4
4
|
export * from './getContextualType';
|
|
5
5
|
export * from './getDeclaration';
|
|
6
6
|
export * from './getSourceFileOfNode';
|
|
7
|
-
export * from './getTokenAtPosition';
|
|
8
7
|
export * from './getTypeName';
|
|
9
8
|
export * from './isSymbolFromDefaultLibrary';
|
|
10
9
|
export * from './isTypeReadonly';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,6 @@ __exportStar(require("./getConstrainedTypeAtLocation"), exports);
|
|
|
21
21
|
__exportStar(require("./getContextualType"), exports);
|
|
22
22
|
__exportStar(require("./getDeclaration"), exports);
|
|
23
23
|
__exportStar(require("./getSourceFileOfNode"), exports);
|
|
24
|
-
__exportStar(require("./getTokenAtPosition"), exports);
|
|
25
24
|
__exportStar(require("./getTypeName"), exports);
|
|
26
25
|
__exportStar(require("./isSymbolFromDefaultLibrary"), exports);
|
|
27
26
|
__exportStar(require("./isTypeReadonly"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAAyC;AACzC,iEAA+C;AAC/C,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAAyC;AACzC,iEAA+C;AAC/C,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,gDAA8B;AAC9B,+DAA6C;AAC7C,mDAAiC;AACjC,uDAAqC;AACrC,+CAA6B;AAC7B,kDAAgC;AAChC,oDAAkC;AAClC,yDAAuC;AACvC,kDAAgC;AAChC,0EAI8C;AAH5C,kHAAA,aAAa,OAAA;AACb,iHAAA,YAAY,OAAA;AACZ,+HAAA,0BAA0B,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/type-utils",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.36",
|
|
4
4
|
"description": "Type utilities for working with TypeScript + ESLint together",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@typescript-eslint/typescript-estree": "8.0.0-alpha.
|
|
50
|
-
"@typescript-eslint/utils": "8.0.0-alpha.
|
|
49
|
+
"@typescript-eslint/typescript-estree": "8.0.0-alpha.36",
|
|
50
|
+
"@typescript-eslint/utils": "8.0.0-alpha.36",
|
|
51
51
|
"debug": "^4.3.4",
|
|
52
52
|
"ts-api-utils": "^1.3.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@jest/types": "29.6.3",
|
|
56
|
-
"@typescript-eslint/parser": "8.0.0-alpha.
|
|
56
|
+
"@typescript-eslint/parser": "8.0.0-alpha.36",
|
|
57
57
|
"ajv": "^6.12.6",
|
|
58
58
|
"downlevel-dts": "*",
|
|
59
59
|
"jest": "29.7.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTokenAtPosition.d.ts","sourceRoot":"","sources":["../src/getTokenAtPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,QAAQ,EAAE,MAAM,GACf,EAAE,CAAC,IAAI,CAyBT"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getTokenAtPosition = getTokenAtPosition;
|
|
27
|
-
const ts = __importStar(require("typescript"));
|
|
28
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
29
|
-
function getTokenAtPosition(sourceFile, position) {
|
|
30
|
-
const queue = [sourceFile];
|
|
31
|
-
let current;
|
|
32
|
-
while (queue.length > 0) {
|
|
33
|
-
current = queue.shift();
|
|
34
|
-
// find the child that contains 'position'
|
|
35
|
-
for (const child of current.getChildren(sourceFile)) {
|
|
36
|
-
const start = child.getFullStart();
|
|
37
|
-
if (start > position) {
|
|
38
|
-
// If this child begins after position, then all subsequent children will as well.
|
|
39
|
-
return current;
|
|
40
|
-
}
|
|
41
|
-
const end = child.getEnd();
|
|
42
|
-
if (position < end ||
|
|
43
|
-
(position === end && child.kind === ts.SyntaxKind.EndOfFileToken)) {
|
|
44
|
-
queue.push(child);
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return current;
|
|
50
|
-
}
|
|
51
|
-
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
|
52
|
-
//# sourceMappingURL=getTokenAtPosition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTokenAtPosition.js","sourceRoot":"","sources":["../src/getTokenAtPosition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,gDA4BC;AA/BD,+CAAiC;AAEjC,6DAA6D;AAC7D,SAAgB,kBAAkB,CAChC,UAAyB,EACzB,QAAgB;IAEhB,MAAM,KAAK,GAAc,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,OAAgB,CAAC;IACrB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,GAAG,KAAK,CAAC,KAAK,EAAG,CAAC;QACzB,0CAA0C;QAC1C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;YACpD,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;YACnC,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;gBACrB,kFAAkF;gBAClF,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,IACE,QAAQ,GAAG,GAAG;gBACd,CAAC,QAAQ,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EACjE,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAClB,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAQ,CAAC;AAClB,CAAC;AACD,4DAA4D"}
|