Skip to content

Commit

Permalink
fix type defs for bindchildren
Browse files Browse the repository at this point in the history
  • Loading branch information
snowbldr committed Aug 25, 2024
1 parent 134f47b commit f91a049
Show file tree
Hide file tree
Showing 13 changed files with 256 additions and 256 deletions.
2 changes: 1 addition & 1 deletion docs/lib/fntags.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function fntemplate (templateFn) {
* @typedef FnStateObj A container for a state value that can be bound to.
* @property {(element?: ()=>(Node|any))=>Node} bindAs Bind this state to the given element function. This causes the element to be replaced when state changes.
* If called with no parameters, the state's value will be rendered as an element.
* @property {(parent: ()=>(Node|any)|any|Node, element: (childState: FnState)=>(Node|any))=>Node} bindChildren Bind the values of this state to the given element.
* @property {(parent: (()=>(Node|any))|any|Node, element: (childState: FnState)=>(Node|any))=>Node} bindChildren Bind the values of this state to the given element.
* Values are items/elements of an array.
* If the current value is not an array, this will behave the same as bindAs.
* @property {(prop: string)=>Node} bindProp Bind to a property of an object stored in this state instead of the state itself.
Expand Down
34 changes: 17 additions & 17 deletions docs/types/interfaces/fntags.FnStateObj.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ a state change and is a shortcut for `mystate(Object.assign(mystate(), update))`

#### Defined in

[fntags.mjs:166](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L166)
[fntags.mjs:166](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L166)

___

Expand All @@ -84,7 +84,7 @@ If called with no parameters, the state's value will be rendered as an element.

#### Defined in

[fntags.mjs:151](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L151)
[fntags.mjs:151](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L151)

___

Expand All @@ -110,13 +110,13 @@ Bind attribute values to state changes

#### Defined in

[fntags.mjs:158](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L158)
[fntags.mjs:158](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L158)

___

### bindChildren

**bindChildren**: (`parent`: () => `any`, `element`: (`childState`: `any`) => `any`) => `Node`
**bindChildren**: (`parent`: `any`, `element`: (`childState`: `any`) => `any`) => `Node`

#### Type declaration

Expand All @@ -130,7 +130,7 @@ If the current value is not an array, this will behave the same as bindAs.

| Name | Type |
| :------ | :------ |
| `parent` | () => `any` |
| `parent` | `any` |
| `element` | (`childState`: `any`) => `any` |

##### Returns
Expand All @@ -139,7 +139,7 @@ If the current value is not an array, this will behave the same as bindAs.

#### Defined in

[fntags.mjs:153](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L153)
[fntags.mjs:153](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L153)

___

Expand All @@ -166,7 +166,7 @@ Shortcut for `mystate.bindAs((current)=> current[prop])`

#### Defined in

[fntags.mjs:156](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L156)
[fntags.mjs:156](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L156)

___

Expand All @@ -192,7 +192,7 @@ Bind selected state to an element

#### Defined in

[fntags.mjs:160](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L160)
[fntags.mjs:160](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L160)

___

Expand All @@ -218,7 +218,7 @@ Bind selected state to an attribute

#### Defined in

[fntags.mjs:161](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L161)
[fntags.mjs:161](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L161)

___

Expand All @@ -244,7 +244,7 @@ Bind style values to state changes

#### Defined in

[fntags.mjs:159](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L159)
[fntags.mjs:159](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L159)

___

Expand Down Expand Up @@ -272,7 +272,7 @@ will not be reflected correctly.

#### Defined in

[fntags.mjs:168](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L168)
[fntags.mjs:168](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L168)

___

Expand All @@ -284,7 +284,7 @@ A flag to indicate that this is a fnstate object

#### Defined in

[fntags.mjs:174](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L174)
[fntags.mjs:174](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L174)

___

Expand All @@ -310,7 +310,7 @@ Remove all of the observers and optionally reset the value to it's initial value

#### Defined in

[fntags.mjs:173](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L173)
[fntags.mjs:173](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L173)

___

Expand Down Expand Up @@ -338,7 +338,7 @@ This causes the bound select functions to be executed.

#### Defined in

[fntags.mjs:162](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L162)
[fntags.mjs:162](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L162)

___

Expand All @@ -358,7 +358,7 @@ Get the currently selected key

#### Defined in

[fntags.mjs:165](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L165)
[fntags.mjs:165](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L165)

___

Expand Down Expand Up @@ -386,7 +386,7 @@ Set a value at the given property path

#### Defined in

[fntags.mjs:171](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L171)
[fntags.mjs:171](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L171)

___

Expand All @@ -412,4 +412,4 @@ Register a callback that will be executed whenever the state is changed

#### Defined in

[fntags.mjs:172](https://github.com/srfnstack/fntags/blob/8c5b29e/src/fntags.mjs#L172)
[fntags.mjs:172](https://github.com/srfnstack/fntags/blob/134f47b/src/fntags.mjs#L172)
Loading

0 comments on commit f91a049

Please sign in to comment.