Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 25, 2023
1 parent e1c5f31 commit 1852319
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
21 changes: 9 additions & 12 deletions Source/Function/Integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
*
*/
export default ((...[_Option = {}]: Parameters<Type>) => {
for (const Option in _Option) {
if (
Object.prototype.hasOwnProperty.call(_Option, Option) &&
_Option[Option] === true
) {
_Option[Option] = Default[Option as keyof typeof Default];
}
}
Object.entries(_Option).forEach(([Key, Value]) =>
Object.defineProperty(_Option, Key, {
value:
Value === true
? Default[Key as keyof typeof Default]
: _Option[Key as keyof typeof _Option],
})
);

const { Path } = Merge(Default, _Option);

const Paths = new Set<Path>();

if (typeof Path !== "undefined") {
if (Array.isArray(Path) || Path instanceof Set) {
for (const _Path of Path) {
Paths.add(_Path);
}
Path.forEach((Path) => Paths.add(Path));
}
}

Expand Down Expand Up @@ -80,7 +78,6 @@ export default ((...[_Option = {}]: Parameters<Type>) => {

import type Type from "../Interface/Integration.js";

// import type Action from "files-pipe/Target/Interface/Action.js";
import type Path from "files-pipe/Target/Type/Path.js";

export const { default: Default } = await import("../Variable/Option.js");
Expand Down
10 changes: 0 additions & 10 deletions Source/Interface/Biome.ts

This file was deleted.

5 changes: 1 addition & 4 deletions Source/Interface/Option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
*
*/
export default interface Type extends Option {
// biome-ignore lint/suspicious/noExplicitAny:
[key: string]: any;

Biome?: boolean | Biome;
}

import type Biome from "./Biome.js";
import type Biome from "../Type/Biome.js";

import type Option from "files-pipe/Target/Interface/Option.js";
9 changes: 9 additions & 0 deletions Source/Type/Biome.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @module Biome
*
*/
export type Type = Omit<Configuration, "$schema">;

export type { Type as default };

import type { Configuration } from "@biomejs/js-api";

0 comments on commit 1852319

Please sign in to comment.