Skip to content

Commit 1418d3d

Browse files
style: fix type issues
1 parent 1781930 commit 1418d3d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/rules/no-sync.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
*/
55
"use strict"
66

7-
const typeMatchesSpecifier = require("ts-declaration-location")
7+
const typeMatchesSpecifier =
8+
/** @type {import('ts-declaration-location').default} */ (
9+
/** @type {unknown} */ (require("ts-declaration-location"))
10+
)
811
const getTypeOfNode = require("../util/get-type-of-node")
912
const getParserServices = require("../util/get-parser-services")
1013

lib/util/get-parser-services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ module.exports = function getParserServices(context) {
2020
return null
2121
}
2222

23-
return getParserServicesFromTsEslint(context, true)
23+
return getParserServicesFromTsEslint(/** @type {any} */ (context), true)
2424
}

lib/util/get-type-of-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = function getTypeOfNode(node, parserServices) {
1313
if (program === null) {
1414
return null
1515
}
16-
const tsNode = esTreeNodeToTSNodeMap.get(node)
16+
const tsNode = esTreeNodeToTSNodeMap.get(/** @type {any} */ (node))
1717
const checker = program.getTypeChecker()
1818
const nodeType = checker.getTypeAtLocation(tsNode)
1919
const constrained = checker.getBaseConstraintOfType(nodeType)

0 commit comments

Comments
 (0)