mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
23 lines
540 B
TypeScript
23 lines
540 B
TypeScript
import AnonymousMechanism = require('sasl-anonymous');
|
|
import { Mechanism } from 'sasl-anonymous';
|
|
import { Factory } from 'saslmechanisms';
|
|
|
|
new Factory().use(AnonymousMechanism);
|
|
new Factory().use(Mechanism);
|
|
|
|
// $ExpectType "ANONYMOUS"
|
|
AnonymousMechanism.prototype.name;
|
|
// $ExpectType true
|
|
AnonymousMechanism.prototype.clientFirst;
|
|
|
|
const m = new AnonymousMechanism();
|
|
|
|
// $ExpectType "ANONYMOUS"
|
|
m.name;
|
|
// $ExpectType true
|
|
m.clientFirst;
|
|
// $ExpectType string
|
|
m.response({ trace: 't' });
|
|
// $ExpectType void
|
|
m.challenge('challenge');
|