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

Don't complain about 'export import =' in strict-export-declare-modifiers #966

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Feb 29, 2024

Motivated by:

import implementation = require("./implementation");
import polyfill = require("./polyfill");
import shim = require("./shim");

type Implementation = typeof implementation;
type Polyfill = typeof polyfill;
type Shim = typeof shim;

declare namespace index {
    export import Flags = implementation.Flags;

    const implementation: Implementation;
    const polyfill: Polyfill;
    const shim: Shim;
}

declare function index(re: ThisParameterType<Implementation>): implementation.Flags;

export = index;

This errors on the export even though it's required to get the right behavior and also does not make all of the other namespace members unexported.

@jakebailey jakebailey merged commit e9b73e3 into microsoft:main Feb 29, 2024
7 checks passed
@jakebailey jakebailey deleted the strict-export-import branch February 29, 2024 18:33
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.

2 participants