Skip to content

Some warnings when I compile with tsc #5

@Genie23

Description

@Genie23

I use Angular4-Color-Picker, and I have some warnings when I compile my typescript scripts :

js/node_modules/angular4-color-picker/lib/color-picker.directive.ts(86,63): error TS2345: Argument of type 'ComponentFactory | undefined' is not assignable to parameter of type 'Compone
ntFactory'.
Type 'undefined' is not assignable to type 'ComponentFactory'.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(52,13): error TS2454: Variable 'h' is used before being assigned.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(55,25): error TS2454: Variable 'h' is used before being assigned.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(89,25): error TS2454: Variable 'r' is used before being assigned.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(89,28): error TS2454: Variable 'g' is used before being assigned.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(89,31): error TS2454: Variable 'b' is used before being assigned.
js/node_modules/angular4-color-picker/lib/color-picker.service.ts(146,13): error TS2322: Type 'null' is not assignable to type 'Hsva'.
js/node_modules/angular4-color-picker/node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(2,22): error TS2420: Class 'DefaultIterableDifferFactory' incorrect
ly implements interface 'IterableDifferFactory'.
Types of property 'create' are incompatible.
Type '(trackByFn?: TrackByFunction | undefined) => DefaultIterableDiffer' is not assignable to type '{ (trackByFn?: TrackByFunction | undefined): IterableDiffer; (_c
dr?: ChangeDetectorRe...'.
Type 'DefaultIterableDiffer' is not assignable to type 'IterableDiffer'.
Types of property 'diff' are incompatible.
Type '(collection: NgIterable) => DefaultIterableDiffer | null' is not assignable to type '(object: NgIterable) => IterableChanges | null'.
Type 'DefaultIterableDiffer | null' is not assignable to type 'IterableChanges | null'.
Type 'DefaultIterableDiffer' is not assignable to type 'IterableChanges | null'.
Type 'DefaultIterableDiffer' is not assignable to type 'IterableChanges'.
Types of property 'forEachOperation' are incompatible.
Type '(fn: (item: IterableChangeRecord, previousIndex: number | null, currentIndex: number | null)...' is not assignable to type '(fn: (record: IterableChangeRecord<
any>, previousIndex: number, currentIndex: number) => void) =>...'.
Types of parameters 'fn' and 'fn' are incompatible.
Types of parameters 'previousIndex' and 'previousIndex' are incompatible.
Type 'number | null' is not assignable to type 'number'.
Type 'null' is not assignable to type 'number'.
js/node_modules/angular4-color-picker/node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(10,22): error TS2420: Class 'DefaultIterableDiffer' incorrectly
implements interface 'IterableChanges'.
Types of property 'forEachOperation' are incompatible.
Type '(fn: (item: IterableChangeRecord, previousIndex: number | null, currentIndex: number | null) =...' is not assignable to type '(fn: (record: IterableChangeRecord, previousInde
x: number, currentIndex: number) => void) => v...'.
Types of parameters 'fn' and 'fn' are incompatible.
Types of parameters 'previousIndex' and 'previousIndex' are incompatible.
Type 'number | null' is not assignable to type 'number'.
Type 'null' is not assignable to type 'number'.
js/node_modules/angular4-color-picker/node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(10,22): error TS2420: Class 'DefaultIterableDiffer' incorrectly
implements interface 'IterableDiffer'.
Types of property 'diff' are incompatible.
Type '(collection: NgIterable) => DefaultIterableDiffer | null' is not assignable to type '(object: NgIterable) => IterableChanges | null'.
Type 'DefaultIterableDiffer | null' is not assignable to type 'IterableChanges | null'.
Type 'DefaultIterableDiffer' is not assignable to type 'IterableChanges | null'.
Type 'DefaultIterableDiffer' is not assignable to type 'IterableChanges'.
Types of property 'forEachOperation' are incompatible.
Type '(fn: (item: IterableChangeRecord, previousIndex: number | null, currentIndex: number | null) =...' is not assignable to type '(fn: (record: IterableChangeRecord, pr
eviousIndex: number, currentIndex: number) => void) => v...'.
Types of parameters 'fn' and 'fn' are incompatible.
Types of parameters 'previousIndex' and 'previousIndex' are incompatible.
Type 'number | null' is not assignable to type 'number'.
Type 'null' is not assignable to type 'number'.

The compilation runs anyway

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions