I have been using ag-grid 6x version for a while for an angularJS app. Now, I'm trying to upgrade ag-grid to latest version 23.x . I used bower to install new the version and I'm trying to use the definition files but few 'd.ts' files are not compiling. I need some help to successfully finish this upgrade.
Here is the error:
bower_components/ag-grid-community/dist/lib/filter/provided/providedFilter.d.ts(50,5): error TS2416: Property 'setModel' in type 'ProvidedFilter' is not assignable to the same property in base type 'IFilterComp'.
Type '(model: ProvidedFilterModel) => Promise<void>' is not assignable to type '(model: any) => void | Promise<void>'.
Type 'Promise<void>' is not assignable to type 'void | Promise<void>'.
Type 'Promise<void>' is missing the following properties from type 'Promise<void>': listOfWaiters, firstOneOnly, map
bower_components/ag-grid-community/dist/lib/filter/provided/simpleFilter.d.ts(83,15): error TS2416: Property 'setModelIntoUi' in type 'SimpleFilter<M>' is not assignable to the same property in base type 'ProvidedFilter'.
Type '(model: ISimpleFilterModel | ICombinedSimpleModel<M>) => Promise<void>' is not assignable to type '(model: ProvidedFilterModel) => Promise<void>'.
Property 'waiters' is missing in type 'ag.grid.Promise<void>' but required in type 'import("D:/svn/Trunk/MAP/WebDev/bower_components/ag-grid-community/dist/lib/utils/promise").Promise<void>'.
bower_components/ag-grid-community/dist/lib/filter/provided/simpleFilter.d.ts(91,15): error TS2416: Property 'resetUiToDefaults' in type 'SimpleFilter<M>' is not assignable to the same property in base type 'ProvidedFilter'.
Type '(silent?: boolean) => ag.grid.Promise<void>' is not assignable to type '(silent?: boolean) => import("D:/svn/Trunk/MAP/WebDev/bower_components/ag-grid-community/dist/lib/utils/promise").Promise<void>'.
Type 'ag.grid.Promise<void>' is not assignable to type 'import("D:/svn/Trunk/MAP/WebDev/bower_components/ag-grid-community/dist/lib/utils/promise").Promise<void>'.
bower_components/ag-grid-community/dist/lib/headerRendering/headerRootComp.d.ts(34,28): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
Typescript version: 3.9.2
ag-grid-community: 23.2.1
Angular 1.5.6 (i think angular version is not the problem here)
Related
I have a classmodel in dart with a json mapper like
class DA_Field {
final String strGROUP;
DA_Field({
required this.strGROUP, });
static DA_Field fromJson(json) => DA_Field(
strGROUP: json['GROUP'] as String, );
}
and I want to set a attribute of the attribute strGROUP via a function - so that I can call that sub-attribute 'width' for example by:
intWidth = DA_Field.strGROUP.width
My first attempt was to create a setter - but after a lot of google, I only get in touch to create a setter for the whole modelclass, not for all of the single attributes.
The values should be calculated by a function outside of the class - I thought maybe this could be possible by .forEach function - like ?
DA_Field.forEach((k,v) => k.width = functionxx(k));
But i get following errors:
error: The setter 'width' isn't defined for the type 'DA_Field'. (undefined_setter...)
error: The argument type 'void Function(DA_Field, dynamic)' can't be assigned to the parameter type 'void Function(DA_Field)'. (argument_type_not_assignable)
Can anyone give me a suggestion on how to do that?
Thanks..
I found an error while testing my app:
PS C:\Expert1\Tvseries-master> flutter test --coverage
02:28 +26 -1: loading C:\Expert1\Tvseries-master\test\data\datasources\televisi_remote_data\televisi_remote_data_source_test.dart [E]
Failed to load "C:\Expert1\Tvseries-master\test\data\datasources\televisi_remote_data\televisi_remote_data_source_test.dart": type 'Null' is not a subtype of type 'bool'
package:ditonton/data/models/televisi_model/televisi_detail_model.dart 50:20 new TelevisiDetailResponse.fromJson
test\data\datasources\televisi_remote_data\televisi_remote_data_source_test.dart 118:52 main.<fn>
package:test_api Declarer.group
package:flutter_test/src/test_compat.dart 189:13 group
test\data\datasources\televisi_remote_data\televisi_remote_data_source_test.dart 116:3 main
What's the reason for the error? How do I fix it?
in this file package:ditonton/data/models/televisi_model/televisi_detail_model.dart 50:20 new TelevisiDetailResponse.fromJson
a field is expecting a boolean value but it received a Null value. you can fix this by making the boolean field nullable. example: bool? isWorking;
I'm using Svelte in combination with a component library named svelte-materialify. For all the components of this library VSCode gives me the following error message when I import one of the components into my pages, e.g. when I import the 'Row' component:
Argument of type 'typeof Row' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
Types of construct signatures are incompatible.
Type 'new (props: RowProps & { children?: any; class?: string; } & Record<string, any>) => Row' is not assignable to type
'new (args: { target: any; props?: any; }) => ATypedSvelteComponent'.
Type 'SvelteComponent<RowProps>' is missing the following properties from type 'ATypedSvelteComponent': $$events_def, $$slot_def
Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
import type { SvelteComponentTyped } from "svelte";
The applications compiles and runs fine without any error messages in the browser. I have no clue what this error tries to tell me and how I can fix it. I would be very thankful if somebody could point me into the right direction.
I upgraded from mongoose v5 to v6 and now the following code no longer works. ChangeEvent<ListingDocument> is no longer the correct type for the change parameter.
Here is the code that worked on mongoose v5:
export default function watchListing() {
Listing.watch([], {fullDocument: "updateLookup"}).on("change", change => {
watchUpdatePrices(change);
});
}
function watchUpdatePrices(change: ChangeEvent<ListingDocument>) {
...
});
Now I get the follow error:
Argument of type 'ChangeStreamDocument<any>' is not assignable to parameter of type 'ChangeEvent<ListingDocument>'.
Type 'ChangeStreamDropDocument' is not assignable to type 'ChangeEvent<ListingDocument>'.
Type 'ChangeStreamDropDocument' is not assignable to type 'ChangeEventOther<ListingDocument>'.
Types of property '_id' are incompatible.
Type 'unknown' is not assignable to type 'ResumeToken'.ts(2345)
How have you Typed change streams?
I'm getting the following error during compiling:
lib/main.dart:40:34: Error: A value of type 'Clubinfo' can't be assigned to a variable of type 'Widget'.
The files sponsor.dart and clubinfo.dart seems to be the same. I've just replaced
Sponsor->Clubinfo
sponsor->clubinfo
Sponsors->Clubinfos
sponsors->clubinfos
final List<Widget> screens = [
Home(), Events(), Players(), Clubinfo(),Sponsors(),
];
The error is coming from this line.
Clubinfo is a copy of sponsors.dart but only sponsors is working.
I've changed the names in the dart file.
lib/main.dart:40:34: Error: A value of type 'Clubinfo' can't be assigned to a variable of type 'Widget'.
Stupid mistake of me.
It must be Clubinfos() instead of Clubinfo().
Thanks for the support.