mirror of
https://github.com/gnu4cn/ts-learnings.git
synced 2024-12-26 21:00:10 +08:00
11 lines
286 B
TypeScript
11 lines
286 B
TypeScript
/// <reference path="references/IShape.ts" />
|
|
/// <reference path="references/Triangle.ts" />
|
|
/// <reference path="references/Circle.ts" />
|
|
|
|
function drawAllShapes(shape: Drawing.IShape) {
|
|
shape.draw();
|
|
}
|
|
|
|
drawAllShapes(new Drawing.Circle());
|
|
drawAllShapes(new Drawing.Triangle());
|