The most common cause of this error is that you are uploading files in the wrong order ... for example ...
File a
class ExampleClass { someMethod() { alert('Hello World'); } }
File B
class ExampleSubClass extends ExampleClass { }
If you were to download File B to File A , you will get the exact error that you are describing. (This includes forgetting to download File A or download File A after File B ).
difficult
If you merge all your files into a single file (and you are probably using the _references.ts file), make sure the links are in the correct order.
/// <reference path="file-a.ts" /> /// <reference path="file-b.ts" />
If you use script tags, this is a similar fix (make sure you use the .js extensions and check the loading order) ...
<script src="file-a.js"></script> <script src="file-b.js"></script>
source share