@definitelytyped/dts-critic
Advanced tools
Comparing version 0.0.157 to 0.0.158-next.4
@@ -28,3 +28,3 @@ export declare enum ErrorKind { | ||
export declare function parseMode(mode: string): Mode | undefined; | ||
export declare type CheckOptions = NameOnlyOptions | CodeOptions; | ||
export type CheckOptions = NameOnlyOptions | CodeOptions; | ||
export interface NameOnlyOptions { | ||
@@ -37,3 +37,3 @@ mode: Mode.NameOnly; | ||
} | ||
export declare type ExportErrorKind = ExportError["kind"]; | ||
export type ExportErrorKind = ExportError["kind"]; | ||
export declare function dtsCritic(dtsPath: string, sourcePath?: string, options?: CheckOptions, debug?: boolean): CriticError[]; | ||
@@ -75,4 +75,4 @@ export declare const defaultErrors: ExportErrorKind[]; | ||
} | ||
declare type ExportError = ExportEqualsError | DefaultExportError | MissingExport; | ||
declare type NpmInfo = NonNpm | Npm; | ||
type ExportError = ExportEqualsError | DefaultExportError | MissingExport; | ||
type NpmInfo = NonNpm | Npm; | ||
interface NonNpm { | ||
@@ -79,0 +79,0 @@ isNpm: false; |
@@ -747,4 +747,5 @@ "use strict"; | ||
function hasExportModifier(node) { | ||
if (node.modifiers) { | ||
return node.modifiers.some((modifier) => modifier.kind === typescript_1.default.SyntaxKind.ExportKeyword); | ||
var _a; | ||
if (typescript_1.default.canHaveModifiers(node)) { | ||
return !!((_a = typescript_1.default.getModifiers(node)) === null || _a === void 0 ? void 0 : _a.some((modifier) => modifier.kind === typescript_1.default.SyntaxKind.ExportKeyword)); | ||
} | ||
@@ -751,0 +752,0 @@ return false; |
@@ -832,4 +832,4 @@ import yargs = require("yargs"); | ||
function hasExportModifier(node: ts.Node): boolean { | ||
if (node.modifiers) { | ||
return node.modifiers.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword); | ||
if (ts.canHaveModifiers(node)) { | ||
return !!ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword); | ||
} | ||
@@ -836,0 +836,0 @@ return false; |
{ | ||
"name": "@definitelytyped/dts-critic", | ||
"version": "0.0.157", | ||
"version": "0.0.158-next.4", | ||
"author": "Nathan Shively-Sanders", | ||
@@ -55,3 +55,3 @@ "description": "Checks a new .d.ts against the Javascript source and tells you what problems it has", | ||
}, | ||
"gitHead": "1ec9262caa58f285ef39619770385f951c309da6" | ||
"gitHead": "e4c9437b79c4b229e0b9774f42c399472995d315" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
198790
3323