I need to access a Typescript library (react-admin) from kotlin-js In particular this types definitions
https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/types.ts
How do I declare in kotlinjs for example the following types ?
export type AuthProvider = {
login: (params: any) => Promise<any>;
logout: (params: any) => Promise<void | false | string>;
checkAuth: (params: any) => Promise<void>;
checkError: (error: any) => Promise<void>;
getIdentity?: () => Promise<UserIdentity>;
getPermissions: (params: any) => Promise<any>;
[key: string]: any;
};
export type DataProvider<ResourceType extends string = string> = {
getList: <RecordType extends RaRecord = any>(
resource: ResourceType,
params: GetListParams
) => Promise<GetListResult<RecordType>>;
getOne: <RecordType extends RaRecord = any>(
resource: ResourceType,
params: GetOneParams
) => Promise<GetOneResult<RecordType>>;
// etc etc ...
}
thanks