3
\$\begingroup\$

I am trying to use Visual Studio code along with PhaserJS but am confused about why the isn't working.

I've read through http://www.johnpapa.net/intellisense-witha-visual-studio-code/ am think I am doing it correctly but still don't get auto-complete. When Phaser gets a green underline and lightbulb, the bulb doesn't include a create reference so I created one above manually.

phaser_issue

\$\endgroup\$
2
  • \$\begingroup\$ Have you figured it out? I also don't have autocomplete in VS Code \$\endgroup\$ Commented Aug 22, 2015 at 19:22
  • \$\begingroup\$ I tried manually adding a reference path to the phaser.js file and it doesn't seem to work. \$\endgroup\$ Commented Oct 1, 2015 at 21:15

1 Answer 1

1
\$\begingroup\$

Try pointing Visual Studio Code to the TypeScript definition:

/// <reference path="../../../phaser/typescript/phaser.d.ts" />

You will likely have to correct the path, of course. That got rid of the green underline for me, and now tab completion and CTRL+SPACE works.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thanks! This worked for me. I went to github and downloaded the phaser.d.ts file, then placed it in my /typings/ directory of my app. \$\endgroup\$ Commented Jan 23, 2016 at 17:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.