diff --git a/types/ldapjs/index.d.ts b/types/ldapjs/index.d.ts index 0afbf16046..8034add042 100644 --- a/types/ldapjs/index.d.ts +++ b/types/ldapjs/index.d.ts @@ -71,6 +71,10 @@ export interface Change { }; } +export var Change: { + new(change: Change): Change; +} + export interface SearchCallBack { (error: Error, result: EventEmitter): void; } diff --git a/types/ldapjs/ldapjs-tests.ts b/types/ldapjs/ldapjs-tests.ts index 6b2d879142..ec106fd29a 100644 --- a/types/ldapjs/ldapjs-tests.ts +++ b/types/ldapjs/ldapjs-tests.ts @@ -18,3 +18,14 @@ let opts: ldap.SearchOptions = { client.search('o=example', opts, (err: Error, res: NodeJS.EventEmitter): void => { // nothing }); + +let change = new ldap.Change({ + operation: 'add', + modification: { + pets: ['cat', 'dog'] + } +}); + +client.modify('cn=foo, o=example', change, function(err) { + // nothing +}); diff --git a/types/ldapjs/tsconfig.json b/types/ldapjs/tsconfig.json index 1f1d5bafc9..a0df7615fd 100644 --- a/types/ldapjs/tsconfig.json +++ b/types/ldapjs/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "ldapjs-tests.ts" ] -} \ No newline at end of file +}