Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

strict-export-declare-modifiers false positive with declare module and export #88

Open
mxl opened this issue Nov 13, 2017 · 1 comment

Comments

@mxl
Copy link

mxl commented Nov 13, 2017

I have definitions file with multiple module declarations like:

declare module 'react-google-maps/lib/components/Circle' {
    import { Component } from 'react'

    export interface CircleProps {
    }

    export default class Circle extends Component<CircleProps> {
    }

Running dtslint results in strict-export-declare-modifiers for each export keyword.

Full example at tomchentw/react-google-maps#646 (remove "strict-export-declare-modifiers": false from tslint.json).

@ghost
Copy link

ghost commented Nov 13, 2017

The export keyword isn't technically necessary inside of declare as everything in there is taken to be an export already.
DefinitelyTyped recommended style is to use a separate file per module (like it would be in source code). So that could go directly in react-google-maps/lib/components/Circle.d.ts.

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

No branches or pull requests

1 participant