Skip to content

Commit

Permalink
restore param so as not to break API stability
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Jul 22, 2022
1 parent 3910179 commit 778cb65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/cli/parse-flags.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LogLevel, LOG_LEVELS, TaskCommand } from '../declarations';
import { CompilerSystem, LogLevel, LOG_LEVELS, TaskCommand } from '../declarations';
import { dashToPascalCase, toDashCase } from '@utils';
import {
BOOLEAN_CLI_ARGS,
Expand All @@ -20,9 +20,11 @@ import {
* Parse command line arguments into a structured `ConfigFlags` object
*
* @param args an array of CLI flags
* @param _sys an optional compiler system
* @returns a structured ConfigFlags object
*/
export const parseFlags = (args: string[]): ConfigFlags => {
export const parseFlags = (args: string[], _sys?: CompilerSystem): ConfigFlags => {
// TODO(STENCIL-509): remove the _sys parameter here ^^ (for v3)
const flags: ConfigFlags = createConfigFlags();

// cmd line has more priority over npm scripts cmd
Expand Down
3 changes: 2 additions & 1 deletion src/cli/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export declare function run(init: CliInitOptions): Promise<void>;
*/
export declare function runTask(coreCompiler: any, config: Config, task: TaskCommand): Promise<void>;

export declare function parseFlags(args: string[], sys?: CompilerSystem): ConfigFlags;
// TODO(STENCIL-509): remove the _sys parameter here (for v3)
export declare function parseFlags(args: string[], _sys?: CompilerSystem): ConfigFlags;

export { CompilerSystem, Config, ConfigFlags, Logger, TaskCommand };

0 comments on commit 778cb65

Please sign in to comment.