mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
🤖 Merge PR #46324 update(alex): minor version update 8.2 by @peterblazejewicz
- missing 'deny' property - version bump - minor cleanup https://github.com/get-alex/alex/releases/tag/8.2.0 Thanks!
This commit is contained in:
parent
6b58148503
commit
32873ece9a
@ -1,22 +1,32 @@
|
||||
// configs
|
||||
const exemption = ['word', 'noun'];
|
||||
const config: alex.AlexOptions = {
|
||||
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
|
||||
|
||||
10
types/alex/index.d.ts
vendored
10
types/alex/index.d.ts
vendored
@ -1,8 +1,7 @@
|
||||
// Type definitions for alex 8.1
|
||||
// Type definitions for alex 8.2
|
||||
// Project: https://alexjs.com
|
||||
// Definitions by: Piotr Błażejewicz (Peter Blazejewicz) <https://github.com/peterblazejewicz>
|
||||
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
import * as vfile from 'vfile';
|
||||
|
||||
@ -20,6 +19,11 @@ declare namespace alex {
|
||||
interface AlexOptions {
|
||||
/** an array of rules (the default is []) */
|
||||
allow?: string[];
|
||||
/**
|
||||
* When provided, only the rules specified are reported.
|
||||
* @default []
|
||||
*/
|
||||
deny?: string[];
|
||||
/**
|
||||
* When turned on (`true`), pairs such as `he` and `she` and `garbageman` or `garbagewoman` are seen as errors.
|
||||
* When turned off (`false`, the default), such pairs are okay
|
||||
|
||||
Loading…
Reference in New Issue
Block a user