Skip to content

Commit 3bb01e3

Browse files
extract d2c main function input as type
1 parent 75e9e9f commit 3bb01e3

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

packages/designto-code/universal/design-to-code.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
TokenizerConfig,
1717
} from "@designto/token/config";
1818
import { default_build_configuration, FrameworkConfig } from "@designto/config";
19-
import { reusable } from "@code-features/component";
19+
// import { reusable } from "@code-features/component";
2020
import assert from "assert";
2121

2222
interface AssetsConfig {
@@ -32,17 +32,19 @@ export type Result = output.ICodeOutput & { widget: Widget } & {
3232
framework: FrameworkConfig;
3333
};
3434

35+
export type DesignToCodeInput = {
36+
input: input.IDesignInput;
37+
framework: config.FrameworkConfig;
38+
build_config?: config.BuildConfiguration;
39+
asset_config: AssetsConfig;
40+
};
41+
3542
export async function designToCode({
3643
input,
3744
framework: framework_config,
3845
asset_config,
3946
build_config = config.default_build_configuration,
40-
}: {
41-
input: input.IDesignInput;
42-
framework: config.FrameworkConfig;
43-
build_config?: config.BuildConfiguration;
44-
asset_config: AssetsConfig;
45-
}): Promise<Result> {
47+
}: DesignToCodeInput): Promise<Result> {
4648
assert(input, "input is required");
4749
if (process.env.NODE_ENV === "development") {
4850
if (framework_config.framework == "vanilla") {

0 commit comments

Comments
 (0)