Add missing TypeScript declaration (#1285)

* Adding missing TypeScript declaration
This commit is contained in:
Kenneth Geisshirt 2017-09-08 10:19:13 +02:00 committed by GitHub
parent 4d4606c905
commit 38bceddfb1
2 changed files with 16 additions and 5 deletions

View File

@ -8,7 +8,7 @@ X.Y.Z Release notes
* Added `Realm.deleteFile` for deleting a Realm (#363).
### Bug fixes
* None
* Adding missing TypeScript declation (#1283).
1.11.1 Release notes (2017-9-1)
=============================================================

19
lib/index.d.ts vendored
View File

@ -279,12 +279,23 @@ declare namespace Realm.Sync {
invalidatePermissionOffer(permissionOfferOrToken: PermissionOffer | string): Promise<void>;
}
type PermissionCondition =
{ [object_type: string]: userId } |
{ [object_type: string]: metadataKey, [object_type: string]: metadataValue };
type PermissionCondition = {
userId: string |
{ metadataKey: string, metadataValue: string }
};
type AccessLevel = 'none' | 'read' | 'write' | 'admin';
class Permission {
readonly id: string;
readonly updatedAt: Date;
readonly userId: string;
readonly path: string;
readonly mayRead?: boolean;
readonly mayWrite?: boolean;
readonly mayManage?: boolean;
}
class PermissionChange {
id: string;
createdAt: Date;