Function tsStripExportKeyword

  • Strips the 'export' keyword from the beginning of each line in the provided source string.

    Parameters

    • source: string

      The source string from which to strip the 'export' keyword.

    Returns string

    The source string with the 'export' keyword stripped from the beginning of each line.

    Remarks

    This function is useful when you want to remove the 'export' keyword from TypeScript code.

    Example

    tsStripExportKeyword('export const foo = "bar";\nexport function baz() {}');;
    //=> 'const foo = "bar";\nfunction baz() {}'

Generated using TypeDoc