Skip to content

Commit ad9ad6f

Browse files
gayratvgtsufiev
authored andcommitted
refactor(index,types): add two exports
add two additional exports
1 parent bae40fa commit ad9ad6f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export {
1111
snakeToCamelCaseConversion,
1212
identityConversion,
1313
primitiveTypeToValue,
14-
typeMetadataKey
14+
typeMetadataKey,
15+
getNameConverter,
16+
StringFunction
1517
} from './types';
1618
export {
1719
SessionPool,

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function typeToValue(type: IType | null | undefined, value: any): IValue {
323323
}
324324
}
325325

326-
type StringFunction = (name?: string) => string;
326+
export type StringFunction = (name?: string) => string;
327327
export interface NamesConversion {
328328
ydbToJs: StringFunction;
329329
jsToYdb: StringFunction;
@@ -336,7 +336,7 @@ export interface TypedDataOptions {
336336
function assertUnreachable(_c: never): never {
337337
throw new Error('Should not get here!');
338338
}
339-
function getNameConverter(options: TypedDataOptions, direction: keyof NamesConversion): StringFunction {
339+
export function getNameConverter(options: TypedDataOptions, direction: keyof NamesConversion): StringFunction {
340340
const converter = options.namesConversion?.[direction];
341341
if (converter) {
342342
return converter;

0 commit comments

Comments
 (0)