fix(lint): correctly find api.ts on windows (#5308)
This commit is contained in:
parent
3c36322c72
commit
3126fee780
|
|
@ -18,6 +18,7 @@
|
||||||
const ts = require('typescript');
|
const ts = require('typescript');
|
||||||
const EventEmitter = require('events');
|
const EventEmitter = require('events');
|
||||||
const Documentation = require('./documentation');
|
const Documentation = require('./documentation');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
/** @typedef {import('../../markdown').MarkdownNode} MarkdownNode */
|
/** @typedef {import('../../markdown').MarkdownNode} MarkdownNode */
|
||||||
|
|
||||||
|
|
@ -92,8 +93,7 @@ function listMethods(rootNames, apiFileName) {
|
||||||
const checker = program.getTypeChecker();
|
const checker = program.getTypeChecker();
|
||||||
const apiClassNames = new Set();
|
const apiClassNames = new Set();
|
||||||
const apiMethods = new Map();
|
const apiMethods = new Map();
|
||||||
const apiSource = program.getSourceFiles().find(f => f.fileName === apiFileName);
|
const apiSource = program.getSourceFiles().find(f => f.fileName === apiFileName.split(path.sep).join(path.posix.sep));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ts.Type} type
|
* @param {ts.Type} type
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue