forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalex-tests.ts
41 lines (35 loc) · 1.71 KB
/
alex-tests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import alex = require('alex');
// configs
const exemption = ['word', 'noun'];
const deny = ['deny', 'word'];
const config: alex.Config = {
allow: exemption,
deny,
noBinary: true,
profanitySureness: 1,
};
const denyConfig: alex.Config = {
deny,
noBinary: true,
profanitySureness: 1,
};
// api
alex('We’ve confirmed his identity.'); // $ExpectType VFile
alex('We’ve confirmed his identity.', exemption); // $ExpectType VFile
alex('We’ve confirmed his identity.', config); // $ExpectType VFile
alex('We’ve confirmed his identity.', denyConfig); // $ExpectType VFile
alex.markdown('### We’ve confirmed his **identity**.'); // $ExpectType VFile
alex.markdown('### We’ve confirmed his **identity**.', exemption); // $ExpectType VFile
alex.markdown('### We’ve confirmed his **identity**.', config); // $ExpectType VFile
alex.markdown('### We’ve confirmed his **identity**.', denyConfig); // $ExpectType VFile
alex.html('<p class="black">He walked to class.</p>'); // $ExpectType VFile
alex.html('<p class="black">He walked to class.</p>', exemption); // $ExpectType VFile
alex.html('<p class="black">He walked to class.</p>', config); // $ExpectType VFile
alex.html('<p class="black">He walked to class.</p>', denyConfig); // $ExpectType VFile
alex.text('The `boogeyman`.'); // $ExpectType VFile
alex.text('The `boogeyman`.', exemption); // $ExpectType VFile
alex.text('The `boogeyman`.', config); // $ExpectType VFile
alex.text('The `boogeyman`.', denyConfig); // $ExpectType VFile
alex.mdx('The `boogeyman`.', denyConfig); // $ExpectType VFile
alex.mdx('<Component>He walked to class.</Component>'); // $ExpectType VFile
alex.mdx('<Component>He walked to class.</Component>', config); // $ExpectType VFile