TypeScript/tests/cases/fourslash/importFixesGlobalTypingsCache.ts
Andrew Branch f9945f5acf
Full support for CommonJS auto-imports in JS (#37027)
* Support add new requires

* Always use destructuring for requiring default exports

* Add more tests

* Update existing fourslash tests

* Use `getExportsAndPropertiesOfModule`

* Add UMD test

* Apply suggestions from code review

Fix typos

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-02-28 14:34:20 -08:00

19 lines
584 B
TypeScript

/// <reference path="fourslash.ts" />
// @Filename: /project/tsconfig.json
//// { "compilerOptions": { "allowJs": true, "checkJs": true } }
// @Filename: /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json
//// { "name": "react-router-dom" }
// @Filename: /Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts
////export class BrowserRouter {}
// @Filename: /project/index.js
////BrowserRouter/**/
goTo.file("/project/index.js");
verify.importFixAtPosition([`const { BrowserRouter } = require("react-router-dom");
BrowserRouter`]);