mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #21105 from JProgrammer/ldapjs-change
ldapjs - Support change as per docs
This commit is contained in:
Vendored
+4
@@ -71,6 +71,10 @@ export interface Change {
|
||||
};
|
||||
}
|
||||
|
||||
export var Change: {
|
||||
new(change: Change): Change;
|
||||
}
|
||||
|
||||
export interface SearchCallBack {
|
||||
(error: Error, result: EventEmitter): void;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
"index.d.ts",
|
||||
"ldapjs-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user