Skip to content

Commit 3b54e5e

Browse files
authored
fix(deno): address import issues in Deno (#339)
1 parent b6974c9 commit 3b54e5e

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

.github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
release-please:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: bcoe/release-please-action@v2.5.5
10+
- uses: bcoe/release-please-action@v2.6.0
1111
id: release
1212
with:
1313
token: ${{ secrets.GITHUB_TOKEN }}

lib/common-types.ts

-18
This file was deleted.

lib/yargs-parser-types.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
import type { Dictionary, KeyOf, ValueOf } from './common-types.js'
1+
/**
2+
* An object whose all properties have the same type, where each key is a string.
3+
*/
4+
export interface Dictionary<T = any> {
5+
[key: string]: T;
6+
}
7+
8+
/**
9+
* Returns the keys of T.
10+
*/
11+
export type KeyOf<T> = {
12+
[K in keyof T]: string extends K ? never : number extends K ? never : K
13+
} extends { [_ in keyof T]: infer U } ? U : never;
14+
15+
/**
16+
* Returns the type of a Dictionary or array values.
17+
*/
18+
export type ValueOf<T> = T extends (infer U)[] ? U : T[keyof T];
219

320
export type ArgsInput = string | any[];
421

lib/yargs-parser.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type {
99
DefaultValuesForType,
1010
DefaultValuesForTypeKey,
1111
DetailedArguments,
12+
Dictionary,
1213
Flag,
1314
Flags,
1415
FlagsKey,
@@ -19,9 +20,9 @@ import type {
1920
CoercionsFlag,
2021
Options,
2122
OptionsDefault,
23+
ValueOf,
2224
YargsParserMixin
2325
} from './yargs-parser-types.js'
24-
import type { Dictionary, ValueOf } from './common-types.js'
2526
import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'
2627

2728
let mixin: YargsParserMixin

0 commit comments

Comments
 (0)