Skip to content

Commit 3767275

Browse files
committed
Preventing circular dependencies in exports
1 parent 9d2adb7 commit 3767275

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

src/lib/client/flash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { browser } from '$app/environment';
2-
import type { FormOptions } from './index.js';
2+
import type { FormOptions } from './superForm.js';
33

44
export function cancelFlash<T extends Record<string, unknown>, M>(options: FormOptions<T, M>) {
55
if (!options.flashMessage || !browser) return;

src/lib/client/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isElementInViewport, scrollToAndCenter } from './elements.js';
2-
import type { FormOptions } from './index.js';
2+
import type { FormOptions } from './superForm.js';
33
import { onDestroy, tick } from 'svelte';
44
import type { Writable } from 'svelte/store';
55

src/lib/client/proxies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { derived, get, type Readable, type Updater, type Writable } from 'svelte/store';
3-
import type { InputConstraint } from '../index.js';
3+
import type { InputConstraint } from '../jsonSchema/constraints.js';
44
import { SuperFormError } from '$lib/errors.js';
55
import { pathExists, traversePath } from '../traversal.js';
66
import { splitPath, type FormPath, type FormPathLeaves, type FormPathType } from '../stringPath.js';
77
import type { FormPathArrays } from '../stringPath.js';
8-
import type { SuperForm, TaintOption } from './index.js';
8+
import type { SuperForm, TaintOption } from './superForm.js';
99
import type { IsAny, Prettify } from '$lib/utils.js';
1010

1111
export type ProxyOptions = {

src/lib/superValidate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { ErrorStatus } from './utils.js';
66
import { splitPath, type FormPathLeavesWithErrors } from './stringPath.js';
77
import type { JSONSchema } from './jsonSchema/index.js';
88
import { mapErrors, mergeDefaults, replaceInvalidDefaults } from './errors.js';
9-
import type { InputConstraints } from '$lib/jsonSchema/constraints.js';
9+
import type { InputConstraints } from './jsonSchema/constraints.js';
1010
import type { SuperStructArray } from './superStruct.js';
1111
import type { SchemaShape } from './jsonSchema/schemaShape.js';
1212

src/lib/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { JSONSchema7Definition } from 'json-schema';
2+
import type { JSONSchema } from './jsonSchema/index.js';
23
import justClone from 'just-clone';
3-
import { SchemaError, type JSONSchema } from './index.js';
4+
import { SchemaError } from './errors.js';
45

56
// Thanks to: https://dev.to/tylim88/typescript-numeric-range-type-15a5#comment-22mld
67
export type NumericRange<

0 commit comments

Comments
 (0)