Skip to content

Commit

Permalink
feat: export types
Browse files Browse the repository at this point in the history
  • Loading branch information
revelt committed Aug 12, 2022
1 parent 4801388 commit 11b5fb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/string-match-left-right/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function isStr(something: unknown): boolean {
return typeof something === "string";
}

interface Opts {
export interface Opts {
cb:
| undefined
| null
Expand Down Expand Up @@ -45,7 +45,7 @@ const defaults: Opts = {
hungry: false,
};

const defaultGetNextIdx = (index: number): number => index + 1;
export const defaultGetNextIdx = (index: number): number => index + 1;

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function march(
Expand Down
3 changes: 3 additions & 0 deletions packages/string-match-left-right/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface Opts {
hungry: boolean;
}
declare const defaults: Opts;
declare const defaultGetNextIdx: (index: number) => number;
declare function matchLeftIncl(
str: string,
position: number,
Expand All @@ -43,6 +44,8 @@ declare function matchRight(
): boolean | string;

export {
Opts,
defaultGetNextIdx,
defaults,
matchLeft,
matchLeftIncl,
Expand Down

0 comments on commit 11b5fb9

Please sign in to comment.