javascript - Can I use the typescript without requireJS? -


i have 2 classes in different files:

export class actionscollection{     constructor(greeting :string){         this.greet(greeting);     }      public greet(greeting :string) {         return "<h1>"+greeting+"</h1>";     } }  

and

import {actionscollection} "./actionscollection";  class greeter extends actionscollection{     constructor(public greeting: string) {         super(greeting);      } }  alert(new greeter("hello, world!")); 

greeter generated in such file in there require line ("./ actionscollection"). want make sure files (*.ts) generates in 1 file main.js, not need require. can that? , if so, how?

p.s. @ same time, assembly, can use standard webstorm tools , gulp. , nothing more, besides modules gulp.

replace

import {actionscollection} "./actionscollection";

with

/// <reference path="./actionscollection.ts" />.

see triple slashes more info on using triple slash imports.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -