Merge pull request #21105 from JProgrammer/ldapjs-change

ldapjs - Support change as per docs
This commit is contained in:
Daniel Rosenwasser
2017-11-07 11:07:31 -08:00
committed by GitHub
3 changed files with 16 additions and 1 deletions
+4
View File
@@ -71,6 +71,10 @@ export interface Change {
};
}
export var Change: {
new(change: Change): Change;
}
export interface SearchCallBack {
(error: Error, result: EventEmitter): void;
}
+11
View File
@@ -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
});
+1 -1
View File
@@ -20,4 +20,4 @@
"index.d.ts",
"ldapjs-tests.ts"
]
}
}