microsoft / microsoft/TypeScript-Sublime-Plugin

Code completion only works with import not with require statement

Open
#176 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
236
Avg merge
21d 13h
Merged PRs (30d)
1

Description

Code completion only works with import not with require statement.

Examples:
Filename: app.ts (works)

/// <reference path='typings/node/node.d.ts' />
import fs = require('fs');
fs. // code completion works

Filename: app.ts (does not work)

/// <reference path='typings/node/node.d.ts' />
var fs = require('fs');
fs. // expected code completion, does not work

Filename: app.js (does not work)

/// <reference path='typings/node/node.d.ts' />
var fs = require('fs');
fs. // expected code completion, does not work

All 3 examples works with visual studio code.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the three cases shown in app.ts and app.js, comparing import-based completion with var fs = require('fs'). Start by tracing the TypeScript Sublime Plugin's completion handling for require statements; done means fs. offers completion in both TypeScript and JavaScript files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.