isprojects / mstform Goto Github PK
View Code? Open in Web Editor NEWMobx State Tree Form-library
License: MIT License
Mobx State Tree Form-library
License: MIT License
Imagine you have a repeating form. In the second entry, we type something that causes the backend process to generate an error for that path. This is happening but then we quickly remove the first entry. The path returned is now 1 too big and the message is associated with the wrong accessor.
How to solve this? Various potential solutions:
when we modify a repeating form we somehow ignore any paths coming in for it. Drawback: no validation errors show up while we should get them, until you interact with the form again causing a change event. Also tricky book keeping.
when we do an insert or delete of repeating form, we always wait until there's a "gap" in processing. Drawback: potential slowdown for user. Insert and delete become asynchronous. Have to use that API and nothing else (like node directly) to modify the form.
use something else than the path to uniquely identify a field. Drawback: lots of code built around the path concept.
use a value in addition to the path. This value is changed whenever we modify the form in a repeating form style way - like a counter or a checksum. The server sends back this value by echoing it. If we have mismatching counters, we resubmit the process request with the new form state and ignore the old information. Drawback: if the user interacts with the form a lot it will take a lot of requests?
I think the last approach offers the most possibility and is fairly simple. We could have a counter that responds to any form modification (so we only accept updates if the form hasn't changed in the mean time - this is another approach perhaps less complicated than the change tracker we have now). This should still work with debouncing too I think.
error "mstform#mobx-state-tree@^2.0.5" doesn't satisfy found match of "[email protected]"
see also mobxjs/mobx-state-tree#1225
It strikes me we can port inputWrap from mstform-antd along with its readonly architecture as it's not dependent on antd itself.
const Profile = types.model('Profile', {
first_name: types.maybeNull(types.string),
})
const form = new Form(Profile as any, {
first_name: new Field(converters.maybe(converters.string))
})
const formState = form.state(clone(this.props.profile))
const first_name = this.formState.field('first_name')
ERROR: TS2345: Argument of type '"first_name"' is not assignable to parameter of type 'never'
When you have an add form (or a repeating add) we can now show it as an empty form. But in some cases we want to have some fields already set to values. We cannot do it for all fields: an integer field that's not maybe() needs to have a potential empty state -- that's why add mode is there.
I realized that mobx compare (if structural comparison is enabled, I think) can probably do what we use a separate dependency for. It would be nice if we could drop that dependency in favor of something we already have available.
We should only ignore required if that makes sense -- if the field uses the maybe converter.
@observer
export class MyForm extends Component {
constructor(props) {
super(props);
this.formState = form.state(o);
}
@computed
get dirty() {
return !_.isEqual(getSnapshot(this.formState.node), this.initial)
}
render() {
const field = this.formState.field("foo");
return (
<React.Fragment>
<InlineError field={field}>
<Input type="text" field={field} />
</InlineError>
<Button
disabled={!this.dirty}
>
Save
</Button>
</React.Fragment>
);
}
}
can we implement state dirty in mstform?
If we create a new item with insert() and the list is currently empty, should we accept arbitrary indices and just ignore it, transforming it into a push()?
Existe one possible for isDisabled in field?
i need disable fields expecifics for editions, and not have react for fields where add isDisabled in field props.
Often a form is split over multiple tabs or pages. When you save the form and get a validation failure, you won't see it for fields that are in the invisible tab. To get an idea that something is wrong at all in a tab an icon could be used. To know when the icon should be displayed, we need an aggregate validation result (valid or invalid) for all fields in that tab. To express this we need this grouping concept.
The idea is that all fields are by default in the default group, but you can organize fields into other groups as well.
Currently we support array-esque fields by putting them into a RepeatingForm
. However, sometimes we want to allow multiple input values in a single field, without it becoming a repeating form. For example: We have a form that can send an email, and we want to send the email to N users. In this case, the form-field should be a single Input field that can include multiple values.
Hi,
I'm trying to build from source and I'm getting a bunch of what seems to be TS typing errors:
EDIT: I also had to remove a reference to a seemingly unused plugin before I ran the build task.
> [email protected] build /home/fullofcaffeine/workspace/code/mstform
> webpack --config webpack.prod.js
Hash: b807d9d56523a98bc0d0
Version: webpack 4.41.2
Time: 8804ms
Built at: 11/08/2019 1:48:40 PM
50 assets
Entrypoint main = mstform.js mstform.js.map
[0] external "mobx" 42 bytes {0} [built]
[1] external "mobx-state-tree" 42 bytes {0} [built]
[3] (webpack)/buildin/global.js 472 bytes {0} [built]
[4] (webpack)/buildin/module.js 497 bytes {0} [built]
[5] ./src/index.ts + 19 modules 127 KiB {0} [built]
| ./src/index.ts 366 bytes [built]
| ./src/controlled.ts 577 bytes [built]
| ./src/converter.ts 2.65 KiB [built]
| ./src/validation-props.ts 172 bytes [built]
| ./src/field-accessor.ts 16.6 KiB [built]
| ./src/repeating-form-indexed-accessor.ts 4.3 KiB [built]
| ./src/repeating-form-accessor.ts 9.27 KiB [built]
| ./src/sub-form-accessor.ts 2.65 KiB [built]
| ./src/backend.ts 8.41 KiB [built]
| ./src/state.ts 21.3 KiB [built]
| ./src/form.ts 7.25 KiB [built]
| ./src/converters.ts 9.42 KiB [built]
| ./src/utils.ts 2.47 KiB [built]
| ./src/validationMessages.ts 2.52 KiB [built]
| ./src/accessor-base.ts 9.73 KiB [built]
| + 5 hidden modules
+ 1 hidden module
ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts(49,13)
TS2314: Generic type 'ModelInstanceType' requires 2 type argument(s).
ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts(54,30)
TS2344: Type 'M[K]' does not satisfy the constraint 'IAnyModelType'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/accessor.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/accessor.test.ts(37,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts(979,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts(1209,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts(62,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts(82,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(70,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(121,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(209,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/fieldref.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/fieldref.test.ts(29,5)
TS2322: Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(126,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(157,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(186,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(220,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(258,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(294,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(330,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(361,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(385,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(417,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(448,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(493,5)
TS2322: Type 'RepeatingForm<{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(519,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(530,30)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(546,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(580,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1391,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1425,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1459,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1536,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1542,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1700,5)
TS2322: Type 'RepeatingForm<{ bar: Field<boolean, boolean>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<boolean, boolean>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<boolean, boolean>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2267,5)
TS2322: Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2277,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2303,5)
TS2322: Type 'RepeatingForm<{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2315,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2369,5)
TS2322: Type 'RepeatingForm<{ hiddenRepeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ hiddenRepeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ hiddenRepeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2381,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2382,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2384,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(251,5)
TS2322: Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(304,5)
TS2322: Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(439,7)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(224,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(247,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(276,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(298,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/navigate.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/navigate.test.ts(78,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(169,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(241,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(279,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(320,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(353,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/demo/component.tsx
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/demo/component.tsx(4,29)
TS7016: Could not find a declaration file for module 'mobx-devtools-mst'. '/home/fullofcaffeine/workspace/code/mstform/node_modules/mobx-devtools-mst/lib/index.js' implicitly has an 'any' type.
What am I doing wrong? Do I need to install anything else before running npm run build
?
Thanks!
The field change hook doesn't get called when you set a field to the empty value. This should be fixed.
In a CheckboxGroup, it shouldn't be required if you don't select a checkbox -- or should it? In a cascader, there's also a stringArray -- but shouldn't it be required if you don't fill in something?
Converters (and validation functions) currently work in isolation. But sometimes it's useful to have systemwide policy; i18n and localisation are examples of this. We need the ability to access such a context in various places.
Hi,
Currently from docs it looks like validators functions get field and its value.
It will be good to have state from mst or node (similar which we get in onChange) so as to perform validations against other values.
Scenario is - some field's value should be "correct" if checkbox is checked or age is <30 etc. or else the value must be "wrong"...
Hope there's already a way to achieve this by accessing other field's values from state during specific field validation.
Thanks!
A configuration option for the decimal converter (and number converter?) that displays these numbers with two digits at all times. On input this won't have an effect, however.
Currently, it's too much of a hassle to properly implement this behaviour - it's causing a lot of bugs. So we've decided to scrap it for now. Here's the code that was written, located in decimal.ts
:
export function trimDecimals(
value: string,
options: StateConverterOptionsWithContext,
decimalOptions?:
| Partial<DecimalOptions>
| ((context: any) => Partial<DecimalOptions>)
): string {
const [before, after] = value.split(".");
if (typeof after === "undefined") {
return value;
}
const trimmedAfter = after.substring(
0,
getOptions(options.context, decimalOptions).decimalPlaces
);
if (trimmedAfter.length === 0) {
return before;
}
return [before, trimmedAfter].join(".");
}
This might be useful when trying to re-implement this behaviour.
teller_no.inputProps.value
below returns Object of type SyntheticEvent
const BankTeller = types
.model("BankTeller", {
teller_no: types.maybe(types.string)
})
export const StudentTransaction = types
.model("StudentTransaction", {
bank_teller: types.maybe(BankTeller),
})
const form = new Form(StudentTransaction, {
bank_teller: new SubForm({
teller_no: new Field(converters.maybe(converters.string), {controlled: controlled.object, required: true})
}),
});
const formInstance = StudentTransaction.create({
bank_teller: {
teller_no: undefined,
}
})
const teller_no = this.formState.subForm('bank_teller').field('teller_no')
We have the use case that we want to update the value through the accessor with setValue but we also want to update raw, which setValue normally doesn't do. So we should introduce a method that automatically calls setRawFromValue() in a single step (or updates the value and relies on the event handler instead).
When process and save both are both configured, save could wipe out any process requests still buffered - save will do a reprocess of everything anyway.
But that's actually maybe not correct: what if there are updates (field cleared, default set) still to be processed when a save is done? Defaults should be ignored, but field clears should be triggered or alternatively result in a special validation message. But that means that validate_all should check for this, so this means again that we can throw away anything in process when we save.
When we can trim() a string field so that it becomes empty, we should treat it as empty.
Right now we generously export everything we have, which makes for a rather huge API surface. Instead index.ts should only export things we really need in the external world.
If a field is in add mode we cannot access its value. This makes sense if there's no sensible value
possible at all yet, but for a types.maybe() field the situation is different: there's a sensible value and
it's undefined.
I realized that we don't actually use validators/rawValidators in our code that uses mstform - validation is either embedded in the converter itself, or is completely external and is driven by a backend and external error messages.
If we remove this, field processing wont be asynchronous anymore, which simplifies things quite a bit.
We could create an enabled accessor analogous to disabled, hidden and readOnly. A field accessor is "enabled" if it's not disabled, hidden or readOnly.
I was looking through the docs and didn't find a way to revert changes to the model.
I have a profile settings screen, which has some base editable info of a user and a "save" button.
Sometimes user can decide to dismiss editing. But any changes to the model are already in my model.
How can I decline changes or make a change to the real node just after the save have happened?
Currently the 'required' check behaves like a validation error: when a field is required and you don't fill in a raw value at all (or clear an existing field), the underlying value isn't updated.
This is also behavior for conversion errors: when you can't convert an underlying value, there IS no sensible underlying value and we can't submit the form before that. So this may be all right. Nonetheless, even here it's a bit odd: what if we use the underlying value in a view in application code? Now that we created an incorrect input, the calculation isn't correct anymore. It's a bit odd when we calculate new values based on values that you can't see anymore.
For required there's an additional troubling situation: we can now ignore required values when we validate (and save) the form. But if you empty the field, this means that the original non-empty value is still saved, which is unexpected when you do a reload of the same data. If the underlying field is a string field or maybe(), we can actually better just set the value to empty. This means that the required error isn't like a conversion error anymore -- an error message is set and the underlying value is modified.
It may be that we want to adopt this behavior for all maybe fields and conversion as well -- as soon as you set a value to something that can't be converted, a maybe field can be automatically cleared.
My app uses MST 3.15.0. I started having type and runtime errors when trying to setup a form. When passing the actual model class to the form, TS was complaining my model was missing a field called !!complextype
, and @ runtime I got this:
Error: [mobx-state-tree] Could not resolve 'firstName' in path '/' while resolving '/firstName'
at fail (/home/fullofcaffeine/workspace/code/mstform/node_modules/mobx-state-tree/dist/mobx-state-tree.js:2523:11)
at resolveNodeByPathParts$$1 (/home/fullofcaffeine/workspace/code/mstform/node_modules/mobx-state-tree/dist/mobx-state-tree.js:2452:20)
at resolveNodeByPath$$1 (/home/fullofcaffeine/workspace/code/mstform/node_modules/mobx-state-tree/dist/mobx-state-tree.js:2396:12)
at resolvePath$$1 (/home/fullofcaffeine/workspace/code/mstform/node_modules/mobx-state-tree/dist/mobx-state-tree.js:507:16)
at e.Object [as getValue] (/home/fullofcaffeine/workspace/code/mstform/dist/webpack:/mstform/src/state.ts:486:12)
at new getValue (/home/fullofcaffeine/workspace/code/mstform/dist/webpack:/mstform/src/field-accessor.ts:43:25)
at e.createField (/home/fullofcaffeine/workspace/code/mstform/dist/webpack:/mstform/src/form-accessor-base.ts:186:20)
at createField (/home/fullofcaffeine/workspace/code/mstform/dist/webpack:/mstform/src/form-accessor-base.ts:169:14)
at Array.forEach (<anonymous>)
at e.forEach [as initialize] (/home/fullofcaffeine/workspace/code/mstform/dist/webpack:/mstform/src/form-accessor-base.ts:166:15)
It seems that, since I'm using a linked version / local version of mstform (because I'm working on a fix for SSR), both my app and mstform are using different versions of its required libraries. It seems that mobx-state-tree
is the culprit, though. My app uses 3.14.0
and mstform
3.7.0
.
I tried updating both my app and mstform
to use the latest version of mst but now I can't compile mstform
. I'm pasting the errors I got when building it at the end of this issue.
Wondering if this is easy to solve or if compatibility with mst 3.15.0 will be trickier?
Thanks.
yarn run v1.12.3
$ webpack --config webpack.prod.js
Hash: 9f9871497b8d109f55b7
Version: webpack 4.16.5
Time: 12061ms
Built at: 11/09/2019 1:06:49 AM
50 assets
Entrypoint main = mstform.js mstform.js.map
[0] external "mobx" 42 bytes {0} [built]
[1] external "mobx-state-tree" 42 bytes {0} [built]
[3] (webpack)/buildin/global.js 489 bytes {0} [built]
[4] (webpack)/buildin/module.js 497 bytes {0} [built]
[5] ./src/index.ts + 19 modules 127 KiB {0} [built]
| ./src/backend.ts 8.41 KiB [built]
| ./src/index.ts 366 bytes [built]
| ./src/converters.ts 9.42 KiB [built]
| ./src/validation-props.ts 172 bytes [built]
| ./src/form.ts 7.25 KiB [built]
| ./src/state.ts 21.3 KiB [built]
| ./src/field-accessor.ts 16.6 KiB [built]
| ./src/controlled.ts 577 bytes [built]
| ./src/sub-form-accessor.ts 2.65 KiB [built]
| ./src/repeating-form-indexed-accessor.ts 4.3 KiB [built]
| ./src/converter.ts 2.65 KiB [built]
| ./src/repeating-form-accessor.ts 9.27 KiB [built]
| ./src/form-accessor-base.ts 9.78 KiB [built]
| ./src/decimalParser.ts 8.22 KiB [built]
| ./src/changeTracker.ts 6.75 KiB [built]
| + 5 hidden modules
+ 1 hidden module
ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts(49,13)
TS2314: Generic type 'ModelInstanceType' requires 2 type argument(s).
ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/src/form.ts(54,30)
TS2344: Type 'M[K]' does not satisfy the constraint 'IAnyModelType'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/accessor.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/accessor.test.ts(37,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<number>; bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts(979,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/backend.test.ts(1209,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts(62,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/context.test.ts(82,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(70,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(121,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/derived.test.ts(209,5)
TS2322: Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ calculated: Field<string, any>; a: Field<string, number>; b: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ calculated: ISimpleType<number>; a: ISimpleType<number>; b: ISimpleType<number>; }, { sum(): number; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/fieldref.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/fieldref.test.ts(29,5)
TS2322: Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(126,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(157,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(186,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(220,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(258,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(294,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(330,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(361,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(385,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(417,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(448,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(493,5)
TS2322: Type 'RepeatingForm<{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ n_entries: RepeatingForm<{ bar: Field<string, string>; }, GroupDefinition<{ bar: Field<string, string>; }>>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ n_entries: IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(519,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(530,30)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(546,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(580,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1391,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1425,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1459,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, number>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1536,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1542,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(1700,5)
TS2322: Type 'RepeatingForm<{ bar: Field<boolean, boolean>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<boolean, boolean>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<boolean, boolean>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<boolean>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2267,5)
TS2322: Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2277,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2303,5)
TS2322: Type 'RepeatingForm<{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ repeating2: RepeatingForm<{ repeatingField: Field<string, string>; }, GroupDefinition<{ repeatingField: Field<string, string>; }>>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ repeating2: IArrayType<IModelType<{ repeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2315,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2369,5)
TS2322: Type 'RepeatingForm<{ hiddenRepeatingField: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ hiddenRepeatingField: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ hiddenRepeatingField: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ hiddenRepeatingField: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2381,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2382,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/form.test.ts(2384,17)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(251,5)
TS2322: Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(304,5)
TS2322: Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<...>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }, { one: Group<InstanceFormDefinition<any>>; two: Group<InstanceFormDefinition<any>>; }>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ a: Field<string, number>; b: Field<string, number>; c: Field<string, number>; d: Field<string, number>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ a: ISimpleType<number>; b: ISimpleType<number>; c: ISimpleType<number>; d: ISimpleType<number>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/groups.test.ts(439,7)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(224,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(247,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(276,5)
TS2322: Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ foo: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ foo: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ foo: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/ignore.test.ts(298,15)
TS7006: Parameter 'accessor' implicitly has an 'any' type.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/navigate.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/navigate.test.ts(78,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, { something(): string; }, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(169,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(241,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(279,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(320,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts
[tsl] ERROR in /home/fullofcaffeine/workspace/code/mstform/test/warning.test.ts(353,5)
TS2322: Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'Field<any, IMSTArray<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>> & IStateTreeNode<IArrayType<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>>> | RepeatingForm<...> | SubForm<...> | undefined'.
Type 'RepeatingForm<{ bar: Field<string, string>; }, any>' is not assignable to type 'RepeatingForm<InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>, any>'.
Type '{ bar: Field<string, string>; }' has no properties in common with type 'InstanceFormDefinition<IModelType<{ bar: ISimpleType<string>; }, {}, _NotCustomized, _NotCustomized>>'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Getting an error when trying to build:
Error: Cannot find module 'uglifyjs-webpack-plugin'
Seems this is not being used:
Line 3 in 1dd4ecd
When we return errors by path with the save function, and we do this for a repeating form, and the user removes or inserts an entry in a repeating form, the paths can become out of sync. They will only be fixed until we save again.
This should not be an issue when we have a process function configured - the backend validation will send new paths with new error information when the user makes changes, so things don't become out of sync.
Still, it would be a better design to store external errors directly on the accessors as soon as information comes in from the backend, instead of working with the getError
and getWarning
hook and look things up by paths.
Every accessor should have an internalError, externalError, externalWarning. You can validate while ignoring external errors.
Now that a converter defines what kind of error types it can throw, the conversionError data structure (if it's an object) should actually be typechecked somehow - it makes no sense to define conversion errors that don't exist, and the IDE would help you show that conversion errors exist. It might also make sense to move the conversionError structure into the converter options itself.
Hi!
I'm trying to introduce mstform
in an isomorphic js app, and after installing it and trying to reproduce the demo included in the source-code, I'm getting the following error from webpack
:
yarn dev-server [2.5.0]
yarn run v1.12.3
$ cross-env NODE_ENV=development node scripts/start-ssr server
[2019-11-07T23:40:56.641Z] [server] Compiling
Time: 2577ms
Built at: 11/07/2019 5:40:59 PM
Entrypoint server = server.css server.js server.css.map server.js.map
Debugger listening on ws://127.0.0.1:9229/cee52786-d951-4851-9b0d-22840166de63
For help, see: https://nodejs.org/en/docs/inspector
/home/fullofcaffeine/workspace/code/app/node_modules/mstform/dist/webpack:/mstform/webpack/universalModuleDefinition:10
})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__) {
^
ReferenceError: window is not defined
at Object.window (/home/fullofcaffeine/workspace/code/app/node_modules/mstform/dist/webpack:/mstform/webpack/universalModuleDefinition:10:2)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.mstform (/home/fullofcaffeine/workspace/code/app/build/server/webpack:/external "mstform":1:1)
at __webpack_require__ (/home/fullofcaffeine/workspace/code/app/build/server/webpack:/webpack/bootstrap:19:1)
^CProcess ended
It's not like I'll use it from the server, but it should be able to run the same code on the server so that React can pick it up on the client.
Does anyone know why is it trying to pass the window
object there? Is this module not ready for SSR/isomorphic apps?
Thanks in advance!
Sometimes when you modify a field you want another field to be modified along with it. We could implement this with a change hook on the field options.
new Field(someConverter, { change: (node, value) => { node.someOtherChange() })
the change hook doesn't override the behavior of the normal handleChange -- this still happens. But it lets you take additional actions.
Right now value on a lot of accessors is the 'any' type. This isn't correct, but I spent quite a bit of time to try to derive this information from the underlying model but couldn't make it work.
There are two possible solutions:
propagate the model type to the underlying accessors again. I removed this when I was cleaning up the types recently, but it might do the trick.
a bigger change: make it so that any sub form (or repeating indexed form) is really a Form, and define these forms separately with the model type included. Then use the underlying Form object to get the type. The bigger change has potential other benefits: it allows reuse of sub-forms. But it would break compatibility as well.
When changing the underlying value on an MST model, the processor isn't called upon -- any validations that should (dis)appear as a result of said changed value isn't updated. We could automate this. Perhaps we could do the entire change handling on node level.
I added the exception handler in 'setRaw' to deal with failing servers during async validation. But now failing converters also trigger this issue. We should be more specific in handling async catch.
Right now we have two ways to control decimal behavior:
decimalOptions, either a configuration object or a function that returns a configuration object given the context passed into the 'decimal' converter. This includes how many digits we want to accept, whether we want to allow zeroes and negative numbers.
TokenOptions/StateConverterOptions. This determines what the separators are for decimal rendering and whether we render thousands and are passed into the state and are accessed when we convert, render, etc.
Both offer run-time dynamism; the first gets this information from the context, whereas the second hardcodes this information along with the context.
We should unify these two mechanisms. That will make it easier to make number obey the same rules as decimal (right now some bits are hardcoded too). Which direction we should go in I'm not sure about yet. It can stand as a general mechanism for run-time control over the behavior of converters.
We currently support the notion of hidden, disabled and readonly (and in the future, enabled, see #84) on field accessors. These translate directly to UI concepts: hidden is invisible in the UI, disabled is the input widget shown in a disabled UI state, readonly is shown as a non-input widget.
Can we generalize this to repeating form accessor and sub form accessors too? We already support a special hook for 'isRepeatingFormDisabled', but what does this mean?
hidden is clear: if hidden the repeating form shouldn't be rendered at all.
readOnly: this forces all sub-fields to be readonly even if they are themselves not readonly.
disabled: this forces all sub-fields to be disabled even if they are themselves not disabled.
So if a repeating form accessor or sub form accessor declares itself as non-enabled then it overrides the settings for any fields and sub forms inside it.
Currently the various isDisabledFunc on state which supply the hooks may expect a field accessor. We can generalize them to accept any kind of accessor. This makes it harder to write field specific code but we find ourselves asking an external source with the path anyway, and this would simplify that.
MST defines very IAny* types which make it possible to refer to things without having to specify a lot of generic parameters as any.
This relates to the project to restrict what we export - right now we export far too much.
Currently the validation message is calculated explicitly when you validate the form. This is also performed when you modify a field. But we could see a validation error message as a computed value based on the state of the form (and other state). If we did this, the validation messages would automatically update if, for instance, conversion options change (as long as it's observable).
Just stumble on this library and so far, it looks almost exactly like I'm looking for!
One question I had was whether you had support of some sort for debouncing of form value changes built in. I didn't see it, but I could have missed it.
Thanks for this library
This works
import { configure } from 'mobx';
configure({ enforceActions: 'observe' });
This doesn't:
import { configure } from 'mobx';
configure({ enforceActions: 'always' });
The following code from the demo
Line 88 in f4be827
"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an
action if this change is intended. Tried to modify: [email protected]"
I had to ease strictness because of this library, it would be nice if there was support for strict mobx as well.
When you create a repeatingAccessor or a subForm accessor and you set their type to RepeatingFormAccessor<any,any> or SubFormAccessor<any, any>, typescript loses the ability to recognize that a field exists deeper down in an indexed accessor. It doesn't seem to happen when a repeating/sub form isn't in play.
This may await a big incompatible rework where we do as MST does and make sub/repeating forms declare their MST type just like we ask for forms.
Set up some kind of github CI so that we can see test failures and typing/compilation errors. Integrate it with README through badges.
FieldAccessor has a 'value' property that gives back the underlying value in the MST object. But RepeatingFormAccessor, RepeatingFormIndexedAccessor and SubFormAccessor, along with FormAccessor itself, do not. There is a value: the MST node that this accessor represents. It would be handy to have access to this.
We need to review what to do with 'node' on FieldAccessor, which is actually the value of the parent form, and we may in fact implement it that way, perhaps renaming it "parentValue" or something like that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.