Skip to content

Commit

Permalink
docs(examples): don't use deprecated OptionType (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar authored Oct 27, 2022
1 parent a64ad88 commit a9a0a98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/flags/dotted_options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env -S deno run

import { OptionType } from "../../flags/deprecated.ts";
import { parseFlags } from "../../flags/flags.ts";

const result = parseFlags(Deno.args, {
Expand All @@ -9,11 +8,11 @@ const result = parseFlags(Deno.args, {
flags: [{
name: "bitrate.audio",
aliases: ["b.a", "audio-bitrate"],
type: OptionType.NUMBER,
type: "number",
}, {
name: "bitrate.video",
aliases: ["b.v", "video-bitrate"],
type: OptionType.NUMBER,
type: "number",
}],
});

Expand Down
3 changes: 1 addition & 2 deletions examples/flags/flags.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env -S deno run

import { OptionType } from "../../flags/deprecated.ts";
import { parseFlags } from "../../flags/flags.ts";

console.log(parseFlags(Deno.args, {
flags: [{
name: "file",
aliases: ["foo"],
type: OptionType.INTEGER,
type: "integer",
// file cannot be combined with stdin option
conflicts: ["stdin"],
}],
Expand Down

0 comments on commit a9a0a98

Please sign in to comment.