Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with typescript module import/require. #2255

Merged
merged 1 commit into from
Feb 1, 2016

Conversation

PixelWaffles
Copy link
Contributor

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

import phaser = require('phaser');

( -_- )

browserify ./client/index.ts -p [ tsify --noImplicitAny ] > ./client/bundle.js;

ಠ_ಠ

TypeScript error: client/index.ts(3,25): Error TS2307: Cannot find module 'phaser'.

T~T

declare module "phaser" {
    export = Phaser;
}

( ー̀εー́ )

Server listening on 0.0.0.0:8080

/)^3^(\

… * as phaser from 'phaser';" or "require('phaser');") fails, resulting in a "Cannot find module 'phaser'." typescript error.
@photonstorm
Copy link
Collaborator

👍

photonstorm added a commit that referenced this pull request Feb 1, 2016
Fix issue with typescript module import/require.
@photonstorm photonstorm merged commit 1f664af into phaserjs:dev Feb 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants