mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Lint shuffle-array (#45714)
This commit is contained in:
parent
272aa77de8
commit
8ab344134f
1
types/shuffle-array/index.d.ts
vendored
1
types/shuffle-array/index.d.ts
vendored
@ -4,7 +4,6 @@
|
||||
// jwulf0 <https://github.com/jwulf0>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/**
|
||||
* copy - Sets if should return a shuffled copy of the given array. By default it's a falsy value.
|
||||
* rng - Specifies a custom random number generator.
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
|
||||
import shuffle = require('shuffle-array');
|
||||
|
||||
// shuffle()
|
||||
var a = [1, 2, 3, 4, 5];
|
||||
var result: number[];
|
||||
const a = [1, 2, 3, 4, 5];
|
||||
let result: number[];
|
||||
result = shuffle(a);
|
||||
result = shuffle(a, {});
|
||||
result = shuffle(a, {copy: true});
|
||||
result = shuffle(a, {rng: () => 0});
|
||||
result = shuffle(a, {copy: true, rng: () => 0});
|
||||
|
||||
var b = ['aaa', 'bbb', 'ccc']
|
||||
var result2: string | string[];
|
||||
const b = ['aaa', 'bbb', 'ccc'];
|
||||
let result2: string | string[];
|
||||
result2 = shuffle.pick(b);
|
||||
result2 = shuffle.pick(b, {});
|
||||
result2 = shuffle.pick(b, {picks: 3});
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-var-keyword": false,
|
||||
"prefer-const": false,
|
||||
"prefer-method-signature": false,
|
||||
"semicolon": false,
|
||||
"trim-file": false
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user