mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
fec189f2f3
bundler: - Prevent stack overflow. (denoland/deno#9752) testing: - Bump version - Fix handling of paths on windows. testing_macros: - Bump version - Correctly ignore files.
20 lines
546 B
TypeScript
20 lines
546 B
TypeScript
// Loaded from https://deno.land/x/cliffy@v0.18.0/command/types/boolean.ts
|
|
|
|
|
|
import { boolean } from "../../flags/types/boolean.ts";
|
|
import type { ITypeInfo } from "../types.ts";
|
|
import { Type } from "../type.ts";
|
|
|
|
/** Boolean type with auto completion. Allows `true`, `false`, `0` and `1`. */
|
|
export class BooleanType extends Type<boolean> {
|
|
/** Parse boolean type. */
|
|
public parse(type: ITypeInfo): boolean {
|
|
return boolean(type);
|
|
}
|
|
|
|
/** Complete boolean type. */
|
|
public complete(): string[] {
|
|
return ["true", "false"];
|
|
}
|
|
}
|