Skip to content

Commit 95a8e22

Browse files
authored
Bugfix for TS definition
Error: ```node_modules/ravendb/dist/Types/index.d.ts:2:18 - error TS2430: Interface 'EntitiesCollectionObject<TEntity>' incorrectly extends interface 'IRavenObject<TEntity>'. 'string' index signatures are incompatible. Type 'TEntity | null' is not assignable to type 'TEntity'. 'TEntity' could be instantiated with an arbitrary type which could be unrelated to 'TEntity | null'. 2 export interface EntitiesCollectionObject<TEntity> extends IRavenObject<TEntity> { ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/ravendb/dist/Types/index.d.ts:5:18 - error TS2430: Interface 'RevisionsCollectionObject<TEntity>' incorrectly extends interface 'IRavenObject<TEntity>'. 'string' index signatures are incompatible. Type 'TEntity | null' is not assignable to type 'TEntity'. 'TEntity' could be instantiated with an arbitrary type which could be unrelated to 'TEntity | null'. 5 export interface RevisionsCollectionObject<TEntity> extends IRavenObject<TEntity> { ~~~~~~~~~~~~~~~~~~~~~~~~~```
1 parent e7d6e6e commit 95a8e22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Types/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { SuggestionResult } from "../Documents/Queries/Suggestions/SuggestionResult";
22

3-
export interface EntitiesCollectionObject<TEntity> extends IRavenObject<TEntity> {
3+
export interface EntitiesCollectionObject<TEntity> extends IRavenObject<TEntity | null> {
44
[id: string]: TEntity | null;
55
}
66

7-
export interface RevisionsCollectionObject<TEntity> extends IRavenObject<TEntity> {
7+
export interface RevisionsCollectionObject<TEntity> extends IRavenObject<TEntity | null> {
88
[changeVector: string]: TEntity | null;
99
}
1010

0 commit comments

Comments
 (0)