Skip to content

💚 Generated typings where causing the doc generation to crash #609

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

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jun 8, 2020

Why is this PR for?

The errors were reported by @typescript-eslint/explicit-module-boundary-types as warnings. Unfortunately enabling them would ask to add several missing typings that may not be really needed.

The rule could be added only for the real source code by adding the following into .eslintrc.cjs file:

  overrides: [
    {
      files: ['src/**/*.ts'],
      rules: {
        '@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
      },
    },
  ],

In a nutshell

❌ New feature
❌ Fix an issue
❌ Documentation improvement
✔️ Other: fix build issue

(✔️: yes, ❌: no)

Potential impacts

None.

The errors were reported by @typescript-eslint/explicit-module-boundary-types as warnings. Unfortunately enabling them would ask to add several missing typings that may not be really needed.

The rule could be added only for the real source code by adding the following into `.eslintrc.cjs` file:
```
  overrides: [
    {
      files: ['src/**/*.ts'],
      rules: {
        '@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
      },
    },
  ],
```
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 8, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2e2cdaa:

Sandbox Source
morning-field-uq54o Configuration
nice-noyce-uol4i Configuration

@dubzzz
Copy link
Owner Author

dubzzz commented Jun 8, 2020

For an unknown reason the generated *.d.ts file for EmailArbitrary is:

export declare function emailAddress(): import("./definition/Arbitrary").Arbitrary<string>;

While the one for uuid is:

import { Arbitrary } from './definition/Arbitrary';
export declare function uuid(): Arbitrary<string>;
export declare function uuidV(versionNumber: 1 | 2 | 3 | 4 | 5): Arbitrary<string>;

While both of them are not explicitely typing the exports 🤔
But uuid file is importing import { Arbitrary } from './definition/Arbitrary'; for other functions declared in this file.

@dubzzz dubzzz merged commit 6ca1b2c into master Jun 8, 2020
@dubzzz dubzzz deleted the fix/generated-doc-broken branch June 8, 2020 18:39
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 95.99% when pulling 2e2cdaa on fix/generated-doc-broken into 2bf6206 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants