Skip to content

Enable allowJs with isolatedDeclarations #58262

@weswigham

Description

@weswigham

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

Today, an error is issued when allowJs is set alongside isolatedDeclarations - js and ts .d.ts emit use the same pipeline, so it really should work, provided the error generation logic isn't making too many syntax assumptions.

Mostly, unlocking this is going to involve looking through the isolatedDeclarations tests and copying them with their cast/annotation syntaxes swapped to jsdoc and filenames swapped to .js just to give confidence things are going to work OK (and that getEffectiveTypeNode is being used over a direct .type get in enough places in the error generator). There's a few other JS-specific error cases to look at (js's unique export/expression merges, for one) that may need some new errors, but the bulk of it is just ensuring the existing type node presence checking logic generalizes to jsdoc-sourced type nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions