diff --git a/src/first.ts b/src/first.ts new file mode 100644 index 0000000..09bd9f2 --- /dev/null +++ b/src/first.ts @@ -0,0 +1,13 @@ +import main from './main' + +export interface Options { + name?: string + age?: number +} + +export const first = (options: Options): void => { + main(options) + console.log('first:', options.name, options.age) +} + +export default first diff --git a/src/index.ts b/src/index.ts index 53ae2e0..a5572ce 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,7 @@ import main from './main' +import first from './first' +import second from './second' +import third from './third' import type { Options } from './main' @@ -7,7 +10,10 @@ export type { } export { - main + main, + first, + second, + third } export default main diff --git a/src/second.ts b/src/second.ts new file mode 100644 index 0000000..d230b7e --- /dev/null +++ b/src/second.ts @@ -0,0 +1,15 @@ +import main from './main' +import first from './first' + +export interface Options { + name?: string + age?: number +} + +export const second = (options: Options): void => { + main(options) + first(options) + console.log('second:', options.name, options.age) +} + +export default second diff --git a/src/third.ts b/src/third.ts new file mode 100644 index 0000000..21319c4 --- /dev/null +++ b/src/third.ts @@ -0,0 +1,13 @@ +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) +} + +export default third