deno_std
deno_std copied to clipboard
chore: fix future no-slow-type lint errors with expando properties
trafficstars
Fast check will be getting a bit smarter at analyzing expando properties.
error[missing-explicit-return-type]: missing explicit return type in the public API
--> V:\deno_std\testing\bdd.ts:582:11
|
582 | it.only = function itOnly<T>(...args: ItArgs<T>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
583 | const options = itDefinition(...args);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
584 | return it({
| ^^^^^^^^^^^^^
585 | ...options,
| ^^^^^^^^^^^^^^^
586 | only: true,
| ^^^^^^^^^^^^^^^
587 | });
| ^^^^^
588 | };
| ^ this function is missing an explicit return type
= hint: add an explicit return type to the function
info: all functions in the public API must have an explicit return type
docs: https://jsr.io/go/slow-type-missing-explicit-return-type
error[missing-explicit-return-type]: missing explicit return type in the public API
--> V:\deno_std\testing\bdd.ts:590:13
|
590 | it.ignore = function itIgnore<T>(...args: ItArgs<T>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
591 | const options = itDefinition(...args);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
592 | return it({
| ^^^^^^^^^^^^^
593 | ...options,
| ^^^^^^^^^^^^^^^
594 | ignore: true,
| ^^^^^^^^^^^^^^^^^
595 | });
| ^^^^^
596 | };
| ^ this function is missing an explicit return type
= hint: add an explicit return type to the function
info: all functions in the public API must have an explicit return type
docs: https://jsr.io/go/slow-type-missing-explicit-return-type
error[unsupported-expando-property]: expando property referencing 'anything' conflicts with 'expect.anything'
--> V:\deno_std\expect\expect.ts:209:19
|
209 | expect.anything = anything;
| ^^^^^^^^
= hint: rename 'anything' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
error[unsupported-expando-property]: expando property referencing 'any' conflicts with 'expect.any'
--> V:\deno_std\expect\expect.ts:210:14
|
210 | expect.any = any;
| ^^^
= hint: rename 'any' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
error[unsupported-expando-property]: expando property referencing 'arrayContaining' conflicts with 'expect.arrayContaining'
--> V:\deno_std\expect\expect.ts:211:26
|
211 | expect.arrayContaining = arrayContaining;
| ^^^^^^^^^^^^^^^
= hint: rename 'arrayContaining' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
error[unsupported-expando-property]: expando property referencing 'closeTo' conflicts with 'expect.closeTo'
--> V:\deno_std\expect\expect.ts:212:18
|
212 | expect.closeTo = closeTo;
| ^^^^^^^
= hint: rename 'closeTo' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
error[unsupported-expando-property]: expando property referencing 'stringContaining' conflicts with 'expect.stringContaining'
--> V:\deno_std\expect\expect.ts:213:27
|
213 | expect.stringContaining = stringContaining;
| ^^^^^^^^^^^^^^^^
= hint: rename 'stringContaining' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
error[unsupported-expando-property]: expando property referencing 'stringMatching' conflicts with 'expect.stringMatching'
--> V:\deno_std\expect\expect.ts:214:25
|
214 | expect.stringMatching = stringMatching;
| ^^^^^^^^^^^^^^
= hint: rename 'stringMatching' to something else to avoid conflicts or create a temporary variable with a different name to use in the expando property reference
info: expando properties get converted to a namespace and the reference conflicts with a namespace export
docs: https://jsr.io/go/slow-type-unsupported-expando-property
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.47%. Comparing base (
6deab72) to head (ffb5e0f).
Additional details and impacted files
@@ Coverage Diff @@
## main #4711 +/- ##
==========================================
- Coverage 91.48% 91.47% -0.01%
==========================================
Files 477 477
Lines 37268 37261 -7
Branches 5316 5316
==========================================
- Hits 34093 34084 -9
- Misses 3119 3121 +2
Partials 56 56
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.