Skip to content

Commit

Permalink
fix(config): remove resource proerpty from Config types
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Mar 29, 2022
1 parent d034045 commit f4652dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 1 addition & 8 deletions config/resolve.ts
Expand Up @@ -9,19 +9,12 @@ export function isConfigModule(value: unknown): value is { default: Config } {
isObject((value as Record<PropertyKey, unknown>)["default"]);
}

export async function resolveResource(
{ url, resolve }: Resource,
): Promise<string | undefined> {
return await resolve(url);
}

/** Resolve Config module, return input and output config */
export function resolveConfig(
{ resource, extractor, ...rest }: Config,
{ extractor, ...rest }: Config,
): IOConfig {
return {
inputConfig: {
resource,
extractor,
},
outputConfig: rest,
Expand Down
3 changes: 0 additions & 3 deletions config/types.ts
Expand Up @@ -18,9 +18,6 @@ export type Resource = {
export type Importer = (url: string) => Promise<unknown>;

export type InputConfig = {
/** Define resource location and how to resolve */
resource?: Resource;

/** Token extractor
* @default {@link simpleExtractor}
*/
Expand Down

0 comments on commit f4652dd

Please sign in to comment.