Closed
Description
TypeScript Version: 3.8.0-dev.20191207
Search Terms:
- refactor
- namespace import
- move to new file
Repo
git clone https://github.com/johnpapa/vscode-import-bug.git
- run
npm install
- open
index.ts
- use a quick action to move the
createComment
function to a new file
Bug:
New file is missing an import for Octokit
import { IssuesCreateCommentParams } from '@octokit/rest';
export async function createComment(comment: IssuesCreateCommentParams) {
const octokit = new Octokit({ auth: 'somevalue' });
const response = await octokit.issues.createComment(comment);
return response;
}
In index.ts
, octokit
was imported as a namespace:
import * as Octokit from '@octokit/rest';
Playground Link:
Related Issues: