Skip to content

[api-extractor] Support "import * as __ from __" for local paths #1029

Closed
grafana/grafana
#21931

Description

PR #1002 adds support for declarations like this:

import * as React from 'react';

This is a trivial implementation, where we pretend that * is an actual name exported by the "react" package. It does not work for the general form that introduces a new namespace, for example:

// For example, "Button" in controls.ts becomes "controls.Button"
import * as controls from './controls';

This form is called ts.SyntaxKind.NamespaceImport because it is essentially a more general form of the namespace controls { } declaration kind.

As such, it should probably produce an ApiItemKind.Namespace item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    effort: mediumNeeds a somewhat experienced developerenhancementThe issue is asking for a new feature or design changehelp wantedIf you're looking to contribute, this issue is a good place to start!needs designThe next step is for someone to propose the details of an approach for solving the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions