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). * Added `Realm.deleteFile` for deleting a Realm (#363).
### Bug fixes ### Bug fixes
* None * Adding missing TypeScript declation (#1283).
1.11.1 Release notes (2017-9-1) 1.11.1 Release notes (2017-9-1)
============================================================= =============================================================

17
lib/index.d.ts vendored
View File

@ -279,12 +279,23 @@ declare namespace Realm.Sync {
invalidatePermissionOffer(permissionOfferOrToken: PermissionOffer | string): Promise<void>; invalidatePermissionOffer(permissionOfferOrToken: PermissionOffer | string): Promise<void>;
} }
type PermissionCondition = type PermissionCondition = {
{ [object_type: string]: userId } | userId: string |
{ [object_type: string]: metadataKey, [object_type: string]: metadataValue }; { metadataKey: string, metadataValue: string }
};
type AccessLevel = 'none' | 'read' | 'write' | 'admin'; 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 { class PermissionChange {
id: string; id: string;
createdAt: Date; createdAt: Date;