mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
526 B
TypeScript
16 lines
526 B
TypeScript
//// [tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts] ////
|
|
|
|
//// [classExtendsValidConstructorFunction.ts]
|
|
function foo() { }
|
|
|
|
var x = new foo(); // can be used as a constructor function
|
|
|
|
class C extends foo { } // error, cannot extend it though
|
|
|
|
//// [classExtendsValidConstructorFunction.js]
|
|
"use strict";
|
|
function foo() { }
|
|
var x = new foo(); // can be used as a constructor function
|
|
class C extends foo {
|
|
} // error, cannot extend it though
|