Skip to content

Commit

Permalink
chore: update type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Oct 12, 2024
1 parent 4999808 commit dc1d2b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/unplugin-flag/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const defaultFactory: CoreType.Data["factory"] = {
// * dead-code elimination by value of record `options`
// * handle function as value when return promise binary value
// * handle function as value when return binary value
const createFactory = (_options: CoreType.PluginOption) => defaultFactory;
const createFactory: CoreType.CreateFactory = (_options) => defaultFactory;

Check warning on line 23 in packages/unplugin-flag/src/core/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/unplugin-flag/src/core/index.ts#L23

Added line #L23 was not covered by tests

const getOptionsR = (opt: CoreType.PluginOption) =>
R.fromExecution(() => option.parse(opt));

Check warning on line 26 in packages/unplugin-flag/src/core/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/unplugin-flag/src/core/index.ts#L25-L26

Added lines #L25 - L26 were not covered by tests
Expand Down
2 changes: 2 additions & 0 deletions packages/unplugin-flag/src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export type PluginOption = Record<string, FlagValue>;

export type UnpluginEnvironmentFactory = UnpluginFactory<PluginOption>;

export type CreateFactory = (options: PluginOption) => UnpluginOptions;

export type Data = {
options: PluginOption;
factory: UnpluginOptions;
Expand Down

0 comments on commit dc1d2b4

Please sign in to comment.