typescript-ruby / typescript-rails

An asset pipeline wrapper for the TypeScript language
MIT License
255 stars 30 forks source link

reference_path and vendor files #25

Open owengalenjones opened 9 years ago

owengalenjones commented 9 years ago

Everything seems to be working as expected except that I have been unable to use .d.ts files in the vendor/assets/javascripts directory.

Example:

file structure
app/
  assets/
    application.js
    game.js.ts

vendor/
  assets/
    javascripts/
      phaser/
        phaser.d.ts
        phaser.js
application.js
//= require phaser/phaser
//= require game
game.js.ts
/// <reference path="phaser.d.ts"/>

This results in these error:

TS5007: Cannot resolve referenced file: 
  '/Users/owengalenjones/dev/phaser-test/app/assets/javascripts/phaser.d.ts'.
TS2095: Could not find symbol 'Phaser'.
TS2095: Could not find symbol 'Phaser'. TS2095: Could not find symbol 'Phaser'.

Is there any way to have this reference the phaser.d.ts in vendor/assets/javascripts, or is this impossible?

Thanks!

danturu commented 8 years ago

@owengalenjones have you found a solution?