Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: type-flag named export #18

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/count-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* $ npx tsx ./examples/count-flags -vvv
*/

import typeFlag from '#type-flag';
import { typeFlag } from '#type-flag';

const parsed = typeFlag({
verbose: {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion examples/dot-nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/invert-boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { typeFlag as default } from './type-flag';
export { typeFlag } from './type-flag';
export type { TypeFlag, Flags } from './types';
2 changes: 1 addition & 1 deletion test-d/type-flag.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expectType } from 'tsd';
import typeFlag from '#type-flag';
import { typeFlag } from '#type-flag';

const parsed = typeFlag({
booleanFlag: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion tests/index.ts
Original file line number Diff line number Diff line change
@@ -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 }) => {
Expand Down