diff --git a/examples/count-flags.ts b/examples/count-flags.ts index 8ee5ca1..1496c99 100644 --- a/examples/count-flags.ts +++ b/examples/count-flags.ts @@ -5,7 +5,7 @@ * $ npx tsx ./examples/count-flags -vvv */ -import typeFlag from '#type-flag'; +import { typeFlag } from '#type-flag'; const parsed = typeFlag({ verbose: { diff --git a/examples/custom-type.ts b/examples/custom-type.ts index 9849f7d..05ba67b 100644 --- a/examples/custom-type.ts +++ b/examples/custom-type.ts @@ -5,7 +5,7 @@ * $ npx tsx ./examples/count-flags --size medium */ -import typeFlag from '#type-flag'; +import { typeFlag } from '#type-flag'; const possibleSizes = ['small', 'medium', 'large'] as const; diff --git a/examples/dot-nested.ts b/examples/dot-nested.ts index 2fca8af..0def025 100644 --- a/examples/dot-nested.ts +++ b/examples/dot-nested.ts @@ -5,7 +5,7 @@ * $ npx tsx ./examples/dot-nested --env.TOKEN=123 --env.CI */ -import typeFlag from '#type-flag'; +import { typeFlag } from '#type-flag'; type Environment = { TOKEN?: string; diff --git a/examples/invert-boolean.ts b/examples/invert-boolean.ts index 628edc1..b8fb6c2 100644 --- a/examples/invert-boolean.ts +++ b/examples/invert-boolean.ts @@ -5,7 +5,7 @@ * $ npx tsx ./examples/invert-boolean --boolean=false */ -import typeFlag from '#type-flag'; +import { typeFlag } from '#type-flag'; const parsed = typeFlag({ boolean: Boolean, diff --git a/src/index.ts b/src/index.ts index 657324a..4b7dd9e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export { typeFlag as default } from './type-flag'; +export { typeFlag } from './type-flag'; export type { TypeFlag, Flags } from './types'; diff --git a/test-d/type-flag.test-d.ts b/test-d/type-flag.test-d.ts index 69c6c63..b258680 100644 --- a/test-d/type-flag.test-d.ts +++ b/test-d/type-flag.test-d.ts @@ -1,5 +1,5 @@ import { expectType } from 'tsd'; -import typeFlag from '#type-flag'; +import { typeFlag } from '#type-flag'; const parsed = typeFlag({ booleanFlag: Boolean, diff --git a/tests/index.ts b/tests/index.ts index 0c77d28..27f6c83 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -1,5 +1,5 @@ import { describe, expect } from 'manten'; -import typeFlag, { type Flags } from '#type-flag'; +import { typeFlag, type Flags } from '#type-flag'; describe('Error handling', ({ describe }) => { describe('Invalid flag name', ({ test }) => {