Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(deno): address import issues in Deno (#339)
  • Loading branch information
bcoe committed Nov 9, 2020
1 parent b6974c9 commit 3b54e5e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: bcoe/release-please-action@v2.5.5
- uses: bcoe/release-please-action@v2.6.0
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 0 additions & 18 deletions lib/common-types.ts

This file was deleted.

19 changes: 18 additions & 1 deletion lib/yargs-parser-types.ts
@@ -1,4 +1,21 @@
import type { Dictionary, KeyOf, ValueOf } from './common-types.js'
/**
* An object whose all properties have the same type, where each key is a string.
*/
export interface Dictionary<T = any> {
[key: string]: T;
}

/**
* Returns the keys of T.
*/
export type KeyOf<T> = {
[K in keyof T]: string extends K ? never : number extends K ? never : K
} extends { [_ in keyof T]: infer U } ? U : never;

/**
* Returns the type of a Dictionary or array values.
*/
export type ValueOf<T> = T extends (infer U)[] ? U : T[keyof T];

export type ArgsInput = string | any[];

Expand Down
3 changes: 2 additions & 1 deletion lib/yargs-parser.ts
Expand Up @@ -9,6 +9,7 @@ import type {
DefaultValuesForType,
DefaultValuesForTypeKey,
DetailedArguments,
Dictionary,
Flag,
Flags,
FlagsKey,
Expand All @@ -19,9 +20,9 @@ import type {
CoercionsFlag,
Options,
OptionsDefault,
ValueOf,
YargsParserMixin
} from './yargs-parser-types.js'
import type { Dictionary, ValueOf } from './common-types.js'
import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'

let mixin: YargsParserMixin
Expand Down

0 comments on commit 3b54e5e

Please sign in to comment.