acorn-typescript-import

0.0.0 • Public • Published

acorn-typescript-import

This is a plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.

It implements support for a subset of TypeScript ESM-CJS like imports

import get = require('lodash/get');

Note, the plugin does not support non-external module references, such as import sth = foo.bar;

Usage

This module provides a plugin that can be used to extend the Acorn Parser class:

const { Parser } = require('acorn');
const acornExportNsFrom = require('acorn-typescript-import');
Parser.extend(acornExportNsFrom).parse('import foo = require("bar")');

Thanks

Readme and tests based on acorn-export-ns-from.

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i acorn-typescript-import

Weekly Downloads

2

Version

0.0.0

License

MIT

Unpacked Size

87.5 kB

Total Files

11

Last publish

Collaborators

  • p0lip