Skip to content

Commit 11b5fb9

Browse files
committed
feat: export types
1 parent 4801388 commit 11b5fb9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/string-match-left-right/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function isStr(something: unknown): boolean {
1717
return typeof something === "string";
1818
}
1919

20-
interface Opts {
20+
export interface Opts {
2121
cb:
2222
| undefined
2323
| null
@@ -45,7 +45,7 @@ const defaults: Opts = {
4545
hungry: false,
4646
};
4747

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

5050
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
5151
function march(

packages/string-match-left-right/types/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface Opts {
1717
hungry: boolean;
1818
}
1919
declare const defaults: Opts;
20+
declare const defaultGetNextIdx: (index: number) => number;
2021
declare function matchLeftIncl(
2122
str: string,
2223
position: number,
@@ -43,6 +44,8 @@ declare function matchRight(
4344
): boolean | string;
4445

4546
export {
47+
Opts,
48+
defaultGetNextIdx,
4649
defaults,
4750
matchLeft,
4851
matchLeftIncl,

0 commit comments

Comments
 (0)