New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation errors Angular 16.1.1 (clean install) #876
Comments
Seems like it's using ts v5 right? Some of the errors I just did not get at all and some were ignored intentionally. |
@uNmAnNeR under 4.9.5 and angular 15 also many errors, even i don't use angular-imask package. Seems you need specify types only once, and remove types from dist folder or anyway separate them, may be simply remove types property from package.json |
Seems multiple specifing of types produces conflict. I think It will be enough removing of types property from package.json. I try to check it now. I will be back shortly |
Seems it's pretty simple. |
@uNmAnNeR i used typecript version 4.9.4 (see package.json) and i tried also latest one (5.1.3). In TypeScript, "skipLibCheck" is a compiler flag that allows you to skip type checking for declaration files (.d.ts) in your project. It helps speed up compilation time but increases the risk of type errors if the declaration files are flawed or outdated. |
I know what the flags do. But in tsconfig.json in your project it is as i noticed. |
@Delagen it is not my project |
My reply was not for you ) |
I found several official excuses for myself. Seems like the problem is only related to Angular. Other major frameworks have more trust in library authors (: and also check comments here: Of course For now i will not be rushing to upgrade to v5 soon. And i don't even think that all errors should be fixed. But i'll try to fix errors related to breaking LSP at least. |
Describe the bug
I get compilation errors in angular 16.1.1 in a new/clean project.
To Reproduce
All erros:
Error: node_modules/imask/esm/controls/html-contenteditable-mask-element.d.ts:5:9 - error TS2611: '_unsafeSelectionStart' is defined as a property in class 'HTMLMaskElement', but is overridden here in 'HTMLContenteditableMaskElement' as an accessor.
5 get _unsafeSelectionStart(): number;
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/imask/esm/controls/html-contenteditable-mask-element.d.ts:7:9 - error TS2611: '_unsafeSelectionEnd' is defined as a property in class 'HTMLMaskElement',
but is overridden here in 'HTMLContenteditableMaskElement' as an accessor.
7 get _unsafeSelectionEnd(): number;
~~~~~~~~~~~~~~~~~~~
Error: node_modules/imask/esm/controls/html-contenteditable-mask-element.d.ts:11:9 - error TS2611: 'value' is defined as a property in class 'HTMLMaskElement', but is overridden here in 'HTMLContenteditableMaskElement' as an accessor.
11 get value(): string;
~~~~~
Error: node_modules/imask/esm/controls/html-input-mask-element.d.ts:9:9 - error TS2611: '_unsafeSelectionStart' is defined as a property in class 'HTMLMaskElement', but is overridden here in 'HTMLInputMaskElement' as an accessor.
9 get _unsafeSelectionStart(): number;
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/imask/esm/controls/html-input-mask-element.d.ts:11:9 - error TS2611: '_unsafeSelectionEnd' is defined as a property in class 'HTMLMaskElement', but is overridden here in 'HTMLInputMaskElement' as an accessor.
11 get _unsafeSelectionEnd(): number;
~~~~~~~~~~~~~~~~~~~
Error: node_modules/imask/esm/controls/html-input-mask-element.d.ts:14:9 - error TS2611: 'value' is defined as a property in class 'HTMLMaskElement', but is overridden here
in 'HTMLInputMaskElement' as an accessor.
14 get value(): string;
~~~~~
Error: node_modules/imask/esm/masked/date.d.ts:14:56 - error TS2344: Type 'MaskedDate' does not satisfy the constraint 'MaskedPattern'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: MaskedDate, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: MaskedPattern, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: MaskedDate, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: MaskedPattern, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'MaskedPattern' is missing the following properties from type 'MaskedDate': pattern, isDateExist, date
14 static DEFAULTS: Partial<MaskedPatternOptions<any, MaskedDate, DateOptionsKeys>>;
~~~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/date.d.ts:30:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
'Value' could be instantiated with an arbitrary type which could be unrelated to 'Value | null'.
30 get date(): Value | null;
~~~~
Error: node_modules/imask/esm/masked/date.d.ts:32:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
'Value' could be instantiated with an arbitrary type which could be unrelated to 'Value | null'.
32 get typedValue(): Value | null;
~~~~~~~~~~
Error: node_modules/imask/esm/masked/date.d.ts:32:9 - error TS2416: Property 'typedValue' in type 'MaskedDate' is not assignable to the same property in base type 'MaskedPattern'.
Type 'Value | null' is not assignable to type 'Value'.
'Value' could be instantiated with an arbitrary type which could be unrelated to 'Value | null'.
32 get typedValue(): Value | null;
~~~~~~~~~~
Error: node_modules/imask/esm/masked/date.d.ts:33:9 - error TS2416: Property 'typedValue' in type 'MaskedDate' is not assignable to the same property in base type 'MaskedPattern'.
Type 'Value | null' is not assignable to type 'Value'.
'Value' could be instantiated with an arbitrary type which could be unrelated to 'Value | null'.
33 set typedValue(value: Value);
~~~~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:12:50 - error TS2344: Type 'MaskedDynamic' does not satisfy the constraint 'Masked'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: MaskedDynamic, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: MaskedDynamic, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is missing the following properties from type 'MaskedDynamic': compiledMasks, dispatch, _applyDispatch, currentMaskFlags, doDispatch
12 export type MaskedDynamicOptions = MaskedOptions<MaskedDynamic, 'dispatch'>;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:28:5 - error TS2416: Property 'updateOptions' in type 'MaskedDynamic' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedDynamic, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" |
"skipInvalid" | "dispatch">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedDynamic, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid" | "dispatch">>>'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type 'DynamicMaskType | undefined'.
28 updateOptions(opts: Partial): void;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:29:5 - error TS2416: Property '_update' in type 'MaskedDynamic' is not assignable to the same property in base type
'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedDynamic, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" |
"skipInvalid" | "dispatch">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedDynamic, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid" | "dispatch">>>'.
29 _update(opts: Partial): void;
~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:57:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'boolean | "shift"'.
57 get overwrite(): boolean | 'shift' | undefined;
~~~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:57:9 - error TS2611: 'overwrite' is defined as a property in class 'Masked', but is overridden here in 'MaskedDynamic' as an accessor.
57 get overwrite(): boolean | 'shift' | undefined;
~~~~~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:59:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'boolean | "append" | "remove"'.
59 get eager(): boolean | 'remove' | 'append' | undefined;
~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:59:9 - error TS2611: 'eager' is defined as a property in class 'Masked', but is overridden here in 'MaskedDynamic' as an accessor.
59 get eager(): boolean | 'remove' | 'append' | undefined;
~~~~~
Error: node_modules/imask/esm/masked/dynamic.d.ts:61:9 - error TS2611: 'skipInvalid' is defined as a property in class 'Masked', but is overridden here in 'MaskedDynamic' as an accessor.
61 get skipInvalid(): boolean | undefined;
~~~~~~~~~~~
Error: node_modules/imask/esm/masked/factory.d.ts:62:98 - error TS2344: Type 'Masked & Opts' does not satisfy the constraint 'Masked'.
Types of property 'prepare' are incompatible.
Type '(((chars: string, masked: Masked & Opts, flags: AppendFlags) => string | [string, ChangeDetails]) & ((chars: string, masked: MaskedRegExp, flags: AppendFlags<...>) => string | [...])) | ... 7 more ... | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '((chars: string, masked: Masked & Opts, flags: AppendFlags) => string | [string, ChangeDetails]) & ((chars: string, masked: MaskedRegExp, flags: AppendFlags<...>) => string | [...])' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '((chars: string, masked: Masked & Opts, flags: AppendFlags) => string | [string, ChangeDetails]) & ((chars: string, masked: MaskedRegExp, flags: AppendFlags<...>) => string | [...])' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is not assignable to type 'Masked & Opts'.
Type 'Masked' is not assignable to type 'Opts'.
'Masked' is assignable to the constraint of type 'Opts', but 'Opts' could be instantiated with a different subtype of constraint 'FactoryArg'.
62 export type NormalizedOpts = Opts extends Masked ? NormalizedMaskedOpts : Opts extends FactoryInstanceOpts ? NormalizedInstanceOpts : Opts extends FactoryStaticOpts | FactoryConstructorOpts ? Opts : {
~~~~
Error: node_modules/imask/esm/masked/function.d.ts:2:51 - error TS2344: Type 'MaskedFunction' does not satisfy the constraint 'Masked'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: MaskedFunction, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: MaskedFunction, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is not assignable to type 'MaskedFunction'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type '(value: string, masked: MaskedFunction) => boolean'.
2 export type MaskedFunctionOptions = MaskedOptions;
~~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/function.d.ts:6:5 - error TS2416: Property 'updateOptions' in type 'MaskedFunction' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedFunction, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedFunction, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type '((value: string, masked: MaskedFunction) => boolean) | undefined'.
6 updateOptions(opts: Partial): void;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/function.d.ts:7:5 - error TS2416: Property '_update' in type 'MaskedFunction' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedFunction, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedFunction, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>'.
7 _update(opts: Partial): void;
~~~~~~~
Error: node_modules/imask/esm/masked/number.d.ts:5:49 - error TS2344: Type 'MaskedNumber' does not satisfy the constraint 'Masked'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: MaskedNumber, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: MaskedNumber, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is missing the following properties from type 'MaskedNumber': radix, thousandsSeparator, mapToRadix, min, and 20 more.
5 export type MaskedNumberOptions = MaskedOptions<MaskedNumber, 'radix' | 'thousandsSeparator' | 'mapToRadix' | 'scale' | 'min' | 'max' | 'normalizeZeros' | 'padFractionalZeros'>;
~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/number.d.ts:35:5 - error TS2416: Property 'updateOptions' in type 'MaskedNumber' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedNumber, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid" | "min" | ... 6 more ... | "padFractionalZeros">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedNumber, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" |
"overwrite" | "skipInvalid" | "min" | ... 6 more ... | "padFractionalZeros">>>'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type 'NumberConstructor | undefined'.
35 updateOptions(opts: Partial): void;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/number.d.ts:36:5 - error TS2416: Property '_update' in type 'MaskedNumber' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedNumber, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid" | "min" | ... 6 more ... | "padFractionalZeros">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedNumber, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" |
"overwrite" | "skipInvalid" | "min" | ... 6 more ... | "padFractionalZeros">>>'.
36 _update(opts: Partial): void;
~~~~~~~
Error: node_modules/imask/esm/masked/pattern.d.ts:11:152 - error TS2344: Type 'M' does not satisfy the constraint 'Masked'.
Type 'MaskedPattern' is not assignable to type 'Masked'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: M, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: M, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is not assignable to type 'M'.
'M' could be instantiated with an arbitrary type which could be unrelated to 'Masked'.
11 export type MaskedPatternOptions<Value = string, M extends MaskedPattern = MaskedPattern, Props extends keyof M = never> = MaskedOptions<M, 'definitions' |
'blocks' | 'placeholderChar' | 'displayChar' | 'lazy' | Props>;
~
Error: node_modules/imask/esm/masked/pattern.d.ts:50:5 - error TS2416: Property 'updateOptions' in type 'MaskedPattern' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedPattern, "lazy" | "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | ... 4 more ... | "displayChar">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedPattern, "lazy" | "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | ... 4 more ... | "displayChar">>>'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type 'string | undefined'.
50 updateOptions(opts: Partial<MaskedPatternOptions>): void;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/pattern.d.ts:51:5 - error TS2416: Property '_update' in type 'MaskedPattern' is not assignable to the same property in base type
'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedPattern, "lazy" | "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | ... 4 more ... | "displayChar">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedPattern, "lazy" | "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | ... 4 more ... | "displayChar">>>'.
51 _update(opts: Partial<MaskedPatternOptions>): void;
~~~~~~~
Error: node_modules/imask/esm/masked/pattern/input-definition.d.ts:11:33 - error TS2344: Type 'Opts' does not satisfy the constraint 'FactoryArg'.
Type 'Opts' is not assignable to type 'Masked'.
11 masked: FactoryReturnMasked['state'];
~~~~
node_modules/imask/esm/masked/pattern/input-definition.d.ts:10:41
10 export type PatternInputDefinitionState = MaskedState & {
~~~~
This type parameter might need an
extends Masked<any>
constraint.node_modules/imask/esm/masked/pattern/input-definition.d.ts:10:41
10 export type PatternInputDefinitionState = MaskedState & {
~~~~
This type parameter might need an
extends FactoryArg
constraint.Error: node_modules/imask/esm/masked/pipe.d.ts:9:131 - error TS2344: Type 'Opts' does not satisfy the constraint 'FactoryArg'.
Type 'Opts' is not assignable to type 'Masked'.
9 type TypedValueOf<Opts, Type> = Type extends (typeof PIPE_TYPE.MASKED | typeof PIPE_TYPE.UNMASKED) ? string : FactoryReturnMasked['typedValue'];
~~~~
node_modules/imask/esm/masked/pipe.d.ts:9:19
9 type TypedValueOf<Opts, Type> = Type extends (typeof PIPE_TYPE.MASKED | typeof PIPE_TYPE.UNMASKED) ? string : FactoryReturnMasked['typedValue'];
~~~~
This type parameter might need an
extends Masked<any>
constraint.node_modules/imask/esm/masked/pipe.d.ts:9:19
9 type TypedValueOf<Opts, Type> = Type extends (typeof PIPE_TYPE.MASKED | typeof PIPE_TYPE.UNMASKED) ? string : FactoryReturnMasked['typedValue'];
~~~~
This type parameter might need an
extends FactoryArg
constraint.Error: node_modules/imask/esm/masked/regexp.d.ts:2:49 - error TS2344: Type 'MaskedRegExp' does not satisfy the constraint 'Masked'.
Types of property 'prepare' are incompatible.
Type '((chars: string, masked: MaskedRegExp, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined' is not assignable to type '((chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]) | undefined'.
Type '(chars: string, masked: MaskedRegExp, flags: AppendFlags) => string | [string, ChangeDetails]' is not assignable to type '(chars: string, masked: Masked, flags: AppendFlags) => string | [string, ChangeDetails]'.
Types of parameters 'masked' and 'masked' are incompatible.
Type 'Masked' is not assignable to type 'MaskedRegExp'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type 'RegExp'.
2 export type MaskedRegExpOptions = MaskedOptions;
~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/regexp.d.ts:6:5 - error TS2416: Property 'updateOptions' in type 'MaskedRegExp' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedRegExp, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedRegExp, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" |
"overwrite" | "skipInvalid">>>'.
Types of property 'mask' are incompatible.
Type 'unknown' is not assignable to type 'RegExp | undefined'.
6 updateOptions(opts: Partial): void;
~~~~~~~~~~~~~
Error: node_modules/imask/esm/masked/regexp.d.ts:7:5 - error TS2416: Property '_update' in type 'MaskedRegExp' is not assignable to the same property in base type 'Masked'.
Type '(opts: Partial<Partial<Pick<MaskedRegExp, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void' is not assignable to type '(opts: Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>) => void'.
Types of parameters 'opts' and 'opts' are incompatible.
Type 'Partial<Partial<Pick<Masked, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" | "overwrite" | "skipInvalid">>>' is not assignable to type 'Partial<Partial<Pick<MaskedRegExp, "eager" | "mask" | "parent" | "prepare" | "prepareChar" | "validate" | "commit" | "format" | "parse" |
"overwrite" | "skipInvalid">>>'.
7 _update(opts: Partial): void;
~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
× Failed to compile.
Environment:
package.json
The text was updated successfully, but these errors were encountered: