Skip to content

Commit

Permalink
npm token ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresPrez committed Nov 17, 2022
1 parent a4b8eb3 commit e9234fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ dist
tmp
/out-tsc

# npm token
.npmrc

# dependencies
node_modules

Expand Down
10 changes: 6 additions & 4 deletions packages/plugins/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ function isPlugin(plugin: IPlugin): plugin is IPlugin {
}

function isGeneric(plugin: IPlugin | IParser): plugin is IPlugin {
return plugin.type === PluginTypes.GENERIC;
return isPlugin(plugin) && plugin.type === PluginTypes.GENERIC;
}

function isParser(plugin: IPlugin | IParser): plugin is IParser {
return plugin.type === PluginTypes.PARSER;
// deno-lint-ignore no-explicit-any
function isParser(plugin: any): plugin is IParser {
return plugin.isApplicable && isPlugin(plugin) &&
plugin.type === PluginTypes.PARSER;
}

function isExporter(plugin: IPlugin | IExporter): plugin is IExporter {
return plugin.type === PluginTypes.EXPORTER;
return isPlugin(plugin) && plugin.type === PluginTypes.EXPORTER;
}

export { isExporter, isGeneric, isParser, isPlugin };
Expand Down

0 comments on commit e9234fd

Please sign in to comment.