Documentation
    Preparing search index...

    Represents an import statement parsed from TypeScript/JavaScript code

    // For: import { User } from './models/user'
    const importInfo: Import = {
    specifier: './models/user',
    isConstant: true,
    clause: { type: 'named', value: 'User' }
    }
    type Import = {
        specifier: string;
        isConstant: boolean;
        clause: {
            type: "namespace" | "default" | "named";
            value: string;
            alias?: string;
        };
    }
    Index

    Properties

    specifier: string

    The module specifier being imported from

    isConstant: boolean

    Whether the import specifier is a constant string literal

    clause: {
        type: "namespace" | "default" | "named";
        value: string;
        alias?: string;
    }

    The import clause details

    Type Declaration

    • type: "namespace" | "default" | "named"

      The type of import clause

    • value: string

      The imported identifier name

    • Optionalalias?: string

      Optional alias for named imports with 'as' keyword