Function tsExtractImports

  • Extract all import statements from a given TypeScript source code string.

    Parameters

    • code: string

      The TypeScript code as a string from which to extract import statements.

    Returns ITsExtractImportsResult[]

    An array of objects, each representing an import statement. Each object includes the start and end line numbers (0-indexed) of the import statement in the original code, and the full text of the import statement.

Generated using TypeDoc