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

[Bug?] 'whitespace' rule threw an error. Line with export * as #322

Description

@Toliak

Description
Line export * as something from ... throws an error:

The 'whitespace' rule threw an error in 'C:/Users/Toliak/PycharmProjects/mtasa-typescript-wiki-parser/output/index.d.ts':
TypeError: Cannot read property 'forEach' of undefined
    at cb (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\rules\whitespaceRule.js:140:45)
    at visitNodes (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\typescript\lib\typescript.js:27858:30)
    at Object.forEachChild (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\typescript\lib\typescript.js:28097:24)
    at walk (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\rules\whitespaceRule.js:99:8)
    at Rule.AbstractRule.applyWithFunction (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\language\rule\abstractRule.js:39:9)
    at Rule.apply (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\rules\whitespaceRule.js:41:21)
    at Linter.applyRule (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\linter.js:214:29)
    at C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\linter.js:155:85
    at Object.flatMap (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\utils.js:160:29)
    at Linter.getAllFailures (C:\Users\Toliak\PycharmProjects\mtasa-typescript-wiki-parser\output\node_modules\tslint\lib\linter.js:155:32)

Steps to reproduce

  1. Create an empty .d.ts file
  2. Put (you can replace types/mtasa to any other module):
// Minimum TypeScript Version: 3.8

export * as mtasa from 'types/mtasa';
  1. Run dtslint .

Line export * from 'types/mtasa'; works correctly without any errors

Maybe I am missing something?...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions