Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.
This repository was archived by the owner on May 12, 2025. It is now read-only.

Add support for multitype imports, object literals, and object literals with aliases #48

@traceyyoshima

Description

@traceyyoshima

Add LST elements to support the following imports:

    @Test
    void importObjectLiteral() {
        rewriteRun(
          javaScript(
            """
              import { First , Second , Third } from 'target';
              """
          )
        );
    }

    @Test
    void mixedTypes() {
        rewriteRun(
          javaScript(
            """
              import nameA , { First , Second } from 'targetA';
              """
          )
        );
    }

    @Test
    void multiAlias() {
        rewriteRun(
          javaScript(
            """
              import { FormData as FormDataPolyfill , Blob as BlobPolyfill , File as FilePolyfill } from 'formdata-node'
              """
          )
        );
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions