-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flags argument and switch to amd modules by default.
See microsoft/TypeScript#1544 for more information on why --out was unacceptable with modules.
- Loading branch information
Showing
5 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
load("//typescript:def.bzl", "ts_binary", "ts_library") | ||
|
||
ts_library( | ||
name = "lib", | ||
srcs = [ | ||
"animal.ts", | ||
"main.ts", | ||
] | ||
) | ||
|
||
ts_binary( | ||
name = "flags", | ||
flags = [ | ||
"--noImplicitAny", | ||
], | ||
deps = [ | ||
":lib", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Sample inheritance in typescript. | ||
export default class { | ||
constructor(public name: string) { } | ||
|
||
sound(sound: string) { | ||
return this.name + " goes " + sound; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Sample inheritance in typescript. | ||
import Animal from './animal' | ||
|
||
module Rescue { | ||
export class Dog extends Animal { | ||
constructor(name: string) { | ||
super(name); | ||
} | ||
|
||
sound() { | ||
return "My dog " + super.sound("bark!"); | ||
} | ||
} | ||
} | ||
|
||
let c = new Rescue.Dog("Colby"); | ||
c.sound(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters