Skip to content

Commit a772599

Browse files
committed
📦 change types export path
1 parent fd1562c commit a772599

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

‎api-extractor.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*
4747
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
4848
*/
49-
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
49+
"mainEntryPointFilePath": "<projectFolder>/dist/types/index.d.ts",
5050

5151
/**
5252
* A list of NPM package names whose exports should be treated as part of this package.

‎package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"test:type": "tsd src/__typetest__",
1515
"lint": "eslint '**/*.{js,ts,tsx}'",
1616
"lint:fix": "pnpm lint --fix",
17-
"api-extractor:build": "pnpm build && pnpm api-extractor",
18-
"prepublishOnly": "pnpm install && pnpm lint:fix && pnpm type && pnpm test && pnpm build",
19-
"api-extractor:ci": "node apiExtractor.js"
17+
"api-extractor:build": "pnpm build && pnpm api-extractor run --local",
18+
"api-extractor:ci": "node apiExtractor.js",
19+
"prepublishOnly": "pnpm install && pnpm lint:fix && pnpm type && pnpm test && pnpm build"
2020
},
2121
"devDependencies": {
2222
"@microsoft/api-extractor": "^7.34.4",

‎reports/api-extractor.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,6 @@ export type FormStateProxy<TFieldValues extends FieldValues = FieldValues> = {
340340
isValid: boolean;
341341
};
342342

343-
// Warning: (ae-forgotten-export) The symbol "Subject" needs to be exported by the entry point index.d.ts
344-
//
345343
// @public (undocumented)
346344
export type FormStateSubjectRef<TFieldValues extends FieldValues> = Subject<Partial<FormState<TFieldValues>> & {
347345
name?: InternalFieldName;
@@ -430,6 +428,9 @@ export type IsFlatObject<T extends object> = Extract<Exclude<T[keyof T], NestedV
430428
// @public (undocumented)
431429
export const isFunction: (value: unknown) => value is Function;
432430

431+
// @public (undocumented)
432+
export const isNameInFieldArray: (names: Set<InternalFieldName>, name: InternalFieldName) => boolean;
433+
433434
// @public
434435
export type IsNever<T> = [T] extends [never] ? true : false;
435436

@@ -526,6 +527,11 @@ export type NumericKeys<T extends Traversable> = UnionToIntersection<T extends R
526527
// @public
527528
export type ObjectKeys<T extends Traversable> = Exclude<ToKey<keyof T>, `${string}.${string}` | ''>;
528529

530+
// @public (undocumented)
531+
export type Observer<T> = {
532+
next: (value: T) => void;
533+
};
534+
529535
// Warning: (ae-forgotten-export) The symbol "PathInternal" needs to be exported by the entry point index.d.ts
530536
//
531537
// @public
@@ -651,6 +657,13 @@ export const shouldSubscribeByName: <T extends string | string[] | undefined>(na
651657
export type SplitPathString<PS extends PathString> = SplitPathStringImpl<PS, [
652658
]>;
653659

660+
// @public (undocumented)
661+
export type Subject<T> = {
662+
readonly observers: Observer<T>[];
663+
subscribe: (value: Observer<T>) => Subscription;
664+
unsubscribe: Noop;
665+
} & Observer<T>;
666+
654667
// @public (undocumented)
655668
export type Subjects<TFieldValues extends FieldValues = FieldValues> = {
656669
watch: Subject<{
@@ -671,6 +684,11 @@ export type SubmitErrorHandler<TFieldValues extends FieldValues> = (errors: Fiel
671684
// @public (undocumented)
672685
export type SubmitHandler<TFieldValues extends FieldValues> = (data: TFieldValues, event?: React.BaseSyntheticEvent) => any | Promise<any>;
673686

687+
// @public (undocumented)
688+
export type Subscription = {
689+
unsubscribe: Noop;
690+
};
691+
674692
// @public (undocumented)
675693
export const swapArrayAt: <T>(data: T[], indexA: number, indexB: number) => void;
676694

@@ -955,8 +973,7 @@ export type WatchObserver<TFieldValues extends FieldValues> = (value: DeepPartia
955973

956974
// Warnings were encountered during analysis:
957975
//
958-
// dist/index.d.ts:734:5 - (ae-forgotten-export) The symbol "AsyncDefaultValues" needs to be exported by the entry point index.d.ts
959-
// dist/index.d.ts:1013:5 - (ae-forgotten-export) The symbol "Subscription" needs to be exported by the entry point index.d.ts
976+
// dist/types/index.d.ts:734:5 - (ae-forgotten-export) The symbol "AsyncDefaultValues" needs to be exported by the entry point index.d.ts
960977

961978
// (No @packageDocumentation comment for this package)
962979

0 commit comments

Comments
 (0)