From 7429af86c01e67f2c060e8f1d07f505ac93293fc Mon Sep 17 00:00:00 2001 From: Purplown Moonsteer Date: Tue, 16 May 2023 13:34:35 +0700 Subject: [PATCH 1/2] feat: initial third method --- src/index.ts | 4 +++- src/third.ts | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/third.ts diff --git a/src/index.ts b/src/index.ts index cd85b94..5efb42d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import main from './main' import first from './first' +import third from './third' import type { Options } from './main' @@ -9,7 +10,8 @@ export type { export { main, - first + first, + third } export default main diff --git a/src/third.ts b/src/third.ts new file mode 100644 index 0000000..0fd8c9a --- /dev/null +++ b/src/third.ts @@ -0,0 +1,10 @@ +export interface Options { + name?: string + age?: number +} + +export const third = (options: Options): void => { + console.log('third:', options.name, options.age) +} + +export default third From 463ed276af5f5a83c03908ff3c1c6295c4d98d12 Mon Sep 17 00:00:00 2001 From: Purplown Moonsteer Date: Tue, 16 May 2023 13:39:29 +0700 Subject: [PATCH 2/2] feat: implement main in third method --- src/third.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/third.ts b/src/third.ts index 0fd8c9a..21319c4 100644 --- a/src/third.ts +++ b/src/third.ts @@ -1,9 +1,12 @@ +import main from './main' + export interface Options { name?: string age?: number } export const third = (options: Options): void => { + main(options) console.log('third:', options.name, options.age) }