Skip to content

Commit 606c677

Browse files
ci: apply automated fixes
1 parent 5c3d473 commit 606c677

22 files changed

Lines changed: 293 additions & 263 deletions

File tree

scripts/extract-solid-ref.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,7 @@ function getDocs(declarations) {
750750
function renderComment(comment) {
751751
if (!comment) return "";
752752
if (typeof comment === "string") return comment;
753-
return comment
754-
.map((part) => renderCommentPart(part))
755-
.join("");
753+
return comment.map((part) => renderCommentPart(part)).join("");
756754
}
757755

758756
function renderCommentPart(part) {

src/routes/v2/reference/(1)reactivity/create-effect.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,25 @@ createEffect(
104104

105105
```ts
106106
type ComputeFunction<Prev, Next extends Prev = Prev> = (
107-
v: Prev
107+
v: Prev
108108
) => PromiseLike<Next> | AsyncIterable<Next> | Next;
109109
```
110110

111111
### `EffectBundle`
112112

113113
```ts
114114
type EffectBundle<Prev, Next extends Prev = Prev> = {
115-
effect: EffectFunction<Prev, Next>;
116-
error: (err: unknown, cleanup: () => void) => void;
115+
effect: EffectFunction<Prev, Next>;
116+
error: (err: unknown, cleanup: () => void) => void;
117117
};
118118
```
119119

120120
### `EffectFunction`
121121

122122
```ts
123123
type EffectFunction<Prev, Next extends Prev = Prev> = (
124-
v: Next,
125-
p?: Prev
124+
v: Next,
125+
p?: Prev
126126
) => (() => void) | void;
127127
```
128128

@@ -132,17 +132,17 @@ Options for effect primitives that support deferring/scheduling their initial ru
132132

133133
```ts
134134
interface EffectOptions extends BaseEffectOptions {
135-
/** When true, defers the initial effect execution until the next change */
136-
defer?: boolean;
137-
/**
138-
* When true, enqueues the initial effect callback through the effect queue instead of running
139-
* it synchronously at creation. Lets the initial run participate in transitions -- if any
140-
* source throws `NotReadyError` during the compute phase, the callback is held until the
141-
* transition settles.
142-
*
143-
* Primarily for render effects that need transition-aware initial mounts (e.g. the root
144-
* `insert()` in `render()`).
145-
*/
146-
schedule?: boolean;
147-
};
135+
/** When true, defers the initial effect execution until the next change */
136+
defer?: boolean;
137+
/**
138+
* When true, enqueues the initial effect callback through the effect queue instead of running
139+
* it synchronously at creation. Lets the initial run participate in transitions -- if any
140+
* source throws `NotReadyError` during the compute phase, the callback is held until the
141+
* transition settles.
142+
*
143+
* Primarily for render effects that need transition-aware initial mounts (e.g. the root
144+
* `insert()` in `render()`).
145+
*/
146+
schedule?: boolean;
147+
}
148148
```

src/routes/v2/reference/(1)reactivity/create-memo.mdx

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { createMemo } from "solid-js";
2727

2828
```ts
2929
function createMemo<T>(
30-
compute: ComputeFunction<undefined | NoInfer<T>, T>,
31-
options?: MemoOptions<T>
30+
compute: ComputeFunction<undefined | NoInfer<T>, T>,
31+
options?: MemoOptions<T>
3232
): Accessor<T>;
3333
```
3434

@@ -56,8 +56,8 @@ fullName(); // "Ada Lovelace"
5656
```ts
5757
// Async memo — reads surface as pending inside <Loading>
5858
const user = createMemo(async () => {
59-
const res = await fetch(`/users/${id()}`);
60-
return res.json();
59+
const res = await fetch(`/users/${id()}`);
60+
return res.json();
6161
});
6262
```
6363

@@ -77,31 +77,31 @@ Also used in combination with `SignalOptions` for writable memos
7777

7878
```ts
7979
interface MemoOptions<T> {
80-
/** Stable identifier for the owner hierarchy */
81-
id?: string;
82-
/** Debug name (dev mode only) */
83-
name?: string;
84-
/** When true, the owner is invisible to the ID scheme -- inherits parent ID and doesn't consume a childCount slot */
85-
transparent?: boolean;
86-
/**
87-
* Custom equality function, or `false` to always notify subscribers.
88-
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
89-
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
90-
* notify on every recompute regardless of equality.
91-
*/
92-
equals?: false | ((prev: T, next: T) => boolean);
93-
/** Callback invoked when the computed loses all subscribers */
94-
unobserved?: () => void;
95-
/**
96-
* When true, defers the initial computation until the value is first read,
97-
* **and** opts the memo into autodisposal — once it has no remaining
98-
* subscribers it is torn down and recomputed from scratch on the next read.
99-
* Use it for compute-on-demand values that should not retain state across
100-
* idle periods. Non-lazy owned memos live for their owner's lifetime and
101-
* never autodispose.
102-
*/
103-
lazy?: boolean;
104-
};
80+
/** Stable identifier for the owner hierarchy */
81+
id?: string;
82+
/** Debug name (dev mode only) */
83+
name?: string;
84+
/** When true, the owner is invisible to the ID scheme -- inherits parent ID and doesn't consume a childCount slot */
85+
transparent?: boolean;
86+
/**
87+
* Custom equality function, or `false` to always notify subscribers.
88+
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
89+
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
90+
* notify on every recompute regardless of equality.
91+
*/
92+
equals?: false | ((prev: T, next: T) => boolean);
93+
/** Callback invoked when the computed loses all subscribers */
94+
unobserved?: () => void;
95+
/**
96+
* When true, defers the initial computation until the value is first read,
97+
* **and** opts the memo into autodisposal — once it has no remaining
98+
* subscribers it is torn down and recomputed from scratch on the next read.
99+
* Use it for compute-on-demand values that should not retain state across
100+
* idle periods. Non-lazy owned memos live for their owner's lifetime and
101+
* never autodispose.
102+
*/
103+
lazy?: boolean;
104+
}
105105
```
106106

107107
### `SignalOptions`
@@ -110,18 +110,18 @@ Options for plain signals created with `createSignal(value)` or `createOptimisti
110110

111111
```ts
112112
interface SignalOptions<T> {
113-
/** Debug name (dev mode only) */
114-
name?: string;
115-
/**
116-
* Custom equality function, or `false` to always notify subscribers.
117-
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
118-
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
119-
* notify on every write regardless of equality.
120-
*/
121-
equals?: false | ((prev: T, next: T) => boolean);
122-
/** Suppress dev-mode warnings when writing inside an owned scope */
123-
ownedWrite?: boolean;
124-
/** Callback invoked when the signal loses all subscribers */
125-
unobserved?: () => void;
126-
};
113+
/** Debug name (dev mode only) */
114+
name?: string;
115+
/**
116+
* Custom equality function, or `false` to always notify subscribers.
117+
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
118+
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
119+
* notify on every write regardless of equality.
120+
*/
121+
equals?: false | ((prev: T, next: T) => boolean);
122+
/** Suppress dev-mode warnings when writing inside an owned scope */
123+
ownedWrite?: boolean;
124+
/** Callback invoked when the signal loses all subscribers */
125+
unobserved?: () => void;
126+
}
127127
```

src/routes/v2/reference/(1)reactivity/create-signal.mdx

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ import { createSignal } from "solid-js";
3333
3434
```ts
3535
function createSignal<T>(): Signal<T | undefined>;
36-
function createSignal<T>(value: Exclude<T, Function>, options?: SignalOptions<T>): Signal<T>;
3736
function createSignal<T>(
38-
fn: ComputeFunction<T>,
39-
options?: SignalOptions<T> & MemoOptions<T>
37+
value: Exclude<T, Function>,
38+
options?: SignalOptions<T>
39+
): Signal<T>;
40+
function createSignal<T>(
41+
fn: ComputeFunction<T>,
42+
options?: SignalOptions<T> & MemoOptions<T>
4043
): Signal<T>;
4144
```
4245
@@ -59,9 +62,9 @@ optional object with a name for debugging purposes and equals, a comparator func
5962
```ts
6063
const [count, setCount] = createSignal(0);
6164

62-
count(); // 0
63-
setCount(1); // explicit value
64-
setCount(c => c + 1); // updater
65+
count(); // 0
66+
setCount(1); // explicit value
67+
setCount((c) => c + 1); // updater
6568
```
6669
6770
```ts
@@ -87,31 +90,31 @@ Also used in combination with `SignalOptions` for writable memos
8790
8891
```ts
8992
interface MemoOptions<T> {
90-
/** Stable identifier for the owner hierarchy */
91-
id?: string;
92-
/** Debug name (dev mode only) */
93-
name?: string;
94-
/** When true, the owner is invisible to the ID scheme -- inherits parent ID and doesn't consume a childCount slot */
95-
transparent?: boolean;
96-
/**
97-
* Custom equality function, or `false` to always notify subscribers.
98-
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
99-
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
100-
* notify on every recompute regardless of equality.
101-
*/
102-
equals?: false | ((prev: T, next: T) => boolean);
103-
/** Callback invoked when the computed loses all subscribers */
104-
unobserved?: () => void;
105-
/**
106-
* When true, defers the initial computation until the value is first read,
107-
* **and** opts the memo into autodisposal — once it has no remaining
108-
* subscribers it is torn down and recomputed from scratch on the next read.
109-
* Use it for compute-on-demand values that should not retain state across
110-
* idle periods. Non-lazy owned memos live for their owner's lifetime and
111-
* never autodispose.
112-
*/
113-
lazy?: boolean;
114-
};
93+
/** Stable identifier for the owner hierarchy */
94+
id?: string;
95+
/** Debug name (dev mode only) */
96+
name?: string;
97+
/** When true, the owner is invisible to the ID scheme -- inherits parent ID and doesn't consume a childCount slot */
98+
transparent?: boolean;
99+
/**
100+
* Custom equality function, or `false` to always notify subscribers.
101+
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
102+
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
103+
* notify on every recompute regardless of equality.
104+
*/
105+
equals?: false | ((prev: T, next: T) => boolean);
106+
/** Callback invoked when the computed loses all subscribers */
107+
unobserved?: () => void;
108+
/**
109+
* When true, defers the initial computation until the value is first read,
110+
* **and** opts the memo into autodisposal — once it has no remaining
111+
* subscribers it is torn down and recomputed from scratch on the next read.
112+
* Use it for compute-on-demand values that should not retain state across
113+
* idle periods. Non-lazy owned memos live for their owner's lifetime and
114+
* never autodispose.
115+
*/
116+
lazy?: boolean;
117+
}
115118
```
116119
117120
### `NoInfer`
@@ -126,18 +129,18 @@ Options for plain signals created with `createSignal(value)` or `createOptimisti
126129
127130
```ts
128131
interface SignalOptions<T> {
129-
/** Debug name (dev mode only) */
130-
name?: string;
131-
/**
132-
* Custom equality function, or `false` to always notify subscribers.
133-
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
134-
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
135-
* notify on every write regardless of equality.
136-
*/
137-
equals?: false | ((prev: T, next: T) => boolean);
138-
/** Suppress dev-mode warnings when writing inside an owned scope */
139-
ownedWrite?: boolean;
140-
/** Callback invoked when the signal loses all subscribers */
141-
unobserved?: () => void;
142-
};
132+
/** Debug name (dev mode only) */
133+
name?: string;
134+
/**
135+
* Custom equality function, or `false` to always notify subscribers.
136+
* Defaults to reference equality (`isEqual`). Pass a comparator (e.g.
137+
* `(a, b) => a.id === b.id`) for value-based equality, or `false` to
138+
* notify on every write regardless of equality.
139+
*/
140+
equals?: false | ((prev: T, next: T) => boolean);
141+
/** Suppress dev-mode warnings when writing inside an owned scope */
142+
ownedWrite?: boolean;
143+
/** Callback invoked when the signal loses all subscribers */
144+
unobserved?: () => void;
145+
}
143146
```

src/routes/v2/reference/(2)stores/create-projection.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ Options for derived/projected stores created with `createStore(fn)`, `createProj
8686

8787
```ts
8888
interface ProjectionOptions extends StoreOptions {
89-
/** Key property name or function for reconciliation identity */
90-
key?: string | ((item: NonNullable<any>) => any);
91-
};
89+
/** Key property name or function for reconciliation identity */
90+
key?: string | ((item: NonNullable<any>) => any);
91+
}
9292
```
9393

9494
### `Refreshable`

src/routes/v2/reference/(2)stores/create-store.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ Options for derived/projected stores created with `createStore(fn)`, `createProj
9696

9797
```ts
9898
interface ProjectionOptions extends StoreOptions {
99-
/** Key property name or function for reconciliation identity */
100-
key?: string | ((item: NonNullable<any>) => any);
101-
};
99+
/** Key property name or function for reconciliation identity */
100+
key?: string | ((item: NonNullable<any>) => any);
101+
}
102102
```
103103

104104
### `Refreshable`
@@ -120,9 +120,9 @@ Base options for store primitives.
120120

121121
```ts
122122
interface StoreOptions {
123-
/** Debug name (dev mode only) */
124-
name?: string;
125-
};
123+
/** Debug name (dev mode only) */
124+
name?: string;
125+
}
126126
```
127127

128128
### `StoreSetter`

src/routes/v2/reference/(2)stores/omit.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ function Input(
6363

6464
```ts
6565
type Omit<T, K extends readonly (keyof T)[]> = {
66-
[P in keyof T as Exclude<P, K[number]>]: T[P];
66+
[P in keyof T as Exclude<P, K[number]>]: T[P];
6767
};
6868
```

src/routes/v2/reference/(4)components-context/children.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ function List(props: { children: JSX.Element }) {
5757
### `ChildrenReturn`
5858

5959
```ts
60-
type ChildrenReturn = Accessor<ResolvedChildren> & { toArray: () => ResolvedJSXElement[] };
60+
type ChildrenReturn = Accessor<ResolvedChildren> & {
61+
toArray: () => ResolvedJSXElement[];
62+
};
6163
```
6264

6365
### `ResolvedChildren`

src/routes/v2/reference/(4)components-context/use-context.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ function TodoList() {
6363

6464
```ts
6565
class ContextNotFoundError extends Error {
66-
constructor() {
67-
super(
68-
__DEV__
69-
? "Context must either be created with a default value or a value must be provided before accessing it."
70-
: ""
71-
);
72-
}
73-
};
66+
constructor() {
67+
super(
68+
__DEV__
69+
? "Context must either be created with a default value or a value must be provided before accessing it."
70+
: ""
71+
);
72+
}
73+
}
7474
```

src/routes/v2/reference/(5)components-jsx/dynamic.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;
4444

4545
```ts
4646
type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {
47-
[K in keyof P]: P[K];
47+
[K in keyof P]: P[K];
4848
} & {
49-
component: T | null | undefined | false;
49+
component: T | null | undefined | false;
5050
};
5151
```

0 commit comments

Comments
 (0)