Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(expect): fix future no-slow-type lint errors with expando properties #4711

Merged
merged 3 commits into from
May 12, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented May 10, 2024

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

@dsherret dsherret changed the title chore: fix future fast check errors with expando properties chore: fix future no-slow-type lint errors with expando properties May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iuioiua iuioiua changed the title chore: fix future no-slow-type lint errors with expando properties chore: fix future no-slow-type lint errors with expando properties May 12, 2024
@iuioiua iuioiua changed the title chore: fix future no-slow-type lint errors with expando properties chore(expect): fix future no-slow-type lint errors with expando properties May 12, 2024
@iuioiua iuioiua merged commit 4a7f383 into denoland:main May 12, 2024
14 checks passed
@dsherret dsherret deleted the chore_fix_fast_check_errors branch May 12, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants