From baaa4d70870f7f9301296bc51ffe179aae1c500a Mon Sep 17 00:00:00 2001 From: Rown Moonsteer Date: Tue, 16 May 2023 13:46:04 +0700 Subject: [PATCH 1/2] feat: max second method --- src/index.ts | 2 ++ src/second.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/second.ts diff --git a/src/index.ts b/src/index.ts index 5efb42d..a5572ce 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import main from './main' import first from './first' +import second from './second' import third from './third' import type { Options } from './main' @@ -11,6 +12,7 @@ export type { export { main, first, + second, third } diff --git a/src/second.ts b/src/second.ts new file mode 100644 index 0000000..d13d3ad --- /dev/null +++ b/src/second.ts @@ -0,0 +1,13 @@ +import first from './first' + +export interface Options { + name?: string + age?: number +} + +export const second = (options: Options): void => { + first(options) + console.log('second:', options.name, options.age) +} + +export default second From edb9b7b7c9d8f44fa64c1126483a35c9892c0473 Mon Sep 17 00:00:00 2001 From: Rown Moonsteer Date: Tue, 16 May 2023 13:47:15 +0700 Subject: [PATCH 2/2] feat: implement main method in second-max method --- src/second.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/second.ts b/src/second.ts index d13d3ad..d230b7e 100644 --- a/src/second.ts +++ b/src/second.ts @@ -1,3 +1,4 @@ +import main from './main' import first from './first' export interface Options { @@ -6,6 +7,7 @@ export interface Options { } export const second = (options: Options): void => { + main(options) first(options) console.log('second:', options.name, options.age) }