mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
10 lines
225 B
TypeScript
10 lines
225 B
TypeScript
class Animal {
|
|
static MAX: i32 = 1;
|
|
static add(a: i32, b: i32): i32 { return a + b; }
|
|
static sub<T>(a: T, b: T): T { return a - b; } // tsc does not allow this
|
|
}
|
|
|
|
Animal.MAX;
|
|
Animal.add(1,2);
|
|
Animal.sub<f32>(1.0, 2.0);
|