mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more playing around with typescript
This commit is contained in:
parent
3c40310e9b
commit
005e1e002b
6
public/app/controllers/fileSearcher.d.ts
vendored
Normal file
6
public/app/controllers/fileSearcher.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/// <reference path="../headers/require.d.ts" />
|
||||
declare class FileSearcher {
|
||||
constructor();
|
||||
getFiles(): string[];
|
||||
}
|
||||
export = FileSearcher;
|
13
public/app/controllers/fileSearcher.js
Normal file
13
public/app/controllers/fileSearcher.js
Normal file
@ -0,0 +1,13 @@
|
||||
///<reference path="../headers/require.d.ts" />
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var FileSearcher = (function () {
|
||||
function FileSearcher() {
|
||||
}
|
||||
FileSearcher.prototype.getFiles = function () {
|
||||
return ["asd"];
|
||||
};
|
||||
return FileSearcher;
|
||||
})();
|
||||
return FileSearcher;
|
||||
});
|
||||
//# sourceMappingURL=fileSearcher.js.map
|
1
public/app/controllers/fileSearcher.js.map
Normal file
1
public/app/controllers/fileSearcher.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"fileSearcher.js","sourceRoot":"","sources":["fileSearcher.ts"],"names":["FileSearcher","FileSearcher.constructor","FileSearcher.getFiles"],"mappings":"AAAA,+CAA+C;;IAE/C;QAEIA;QACAC,CAACA;QAEMD,+BAAQA,GAAfA;YACEE,MAAMA,CAACA,CAACA,KAAKA,CAACA,CAACA;QACjBA,CAACA;QACLF,mBAACA;IAADA,CAACA,AARD,IAQC;IAEqB,AAAtB,OAAS,YAAY,CAAC"}
|
18
public/app/controllers/fileSearcher.ts
Normal file
18
public/app/controllers/fileSearcher.ts
Normal file
@ -0,0 +1,18 @@
|
||||
///<reference path="../headers/require.d.ts" />
|
||||
|
||||
class FileSearcher {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
public getFiles() : string[] {
|
||||
return ["asd"];
|
||||
}
|
||||
|
||||
public getBullshit() : any {
|
||||
return "asd";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export = FileSearcher;
|
@ -1,10 +1,11 @@
|
||||
///<reference path="../headers/require.d.ts" />
|
||||
define(["require", "exports", "../components/panelmeta"], function (require, exports) {
|
||||
define(["require", "exports", './fileSearcher', "../components/panelmeta"], function (require, exports, FileSearcher) {
|
||||
var Base = (function () {
|
||||
function Base() {
|
||||
var test = new FileSearcher();
|
||||
test.getFiles();
|
||||
}
|
||||
Base.prototype.getName = function () {
|
||||
debugger;
|
||||
return "asd";
|
||||
};
|
||||
return Base;
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"testCtrl.js","sourceRoot":"","sources":["testCtrl.ts"],"names":["Base","Base.constructor","Base.getName"],"mappings":"AAAA,+CAA+C;;IAM/C;QAEIA;QACAC,CAACA;QAEMD,sBAAOA,GAAdA;YACEE,QAAQA,CAACA;YACTA,MAAMA,CAACA,KAAKA,CAACA;QACfA,CAACA;QACLF,WAACA;IAADA,CAACA,AATD,IASC;IAEa,AAAd,OAAS,IAAI,CAAC"}
|
||||
{"version":3,"file":"testCtrl.js","sourceRoot":"","sources":["testCtrl.ts"],"names":["Base","Base.constructor","Base.getName"],"mappings":"AAAA,+CAA+C;;IAO/C;QAEIA;YACEC,IAAIA,IAAIA,GAAGA,IAAIA,YAAYA,EAAEA,CAACA;YAC9BA,IAAIA,CAACA,QAAQA,EAAEA,CAACA;QAClBA,CAACA;QAEMD,sBAAOA,GAAdA;YACEE,MAAMA,CAACA,KAAKA,CAACA;QACfA,CAACA;QACLF,WAACA;IAADA,CAACA,AAVD,IAUC;IAEa,AAAd,OAAS,IAAI,CAAC"}
|
@ -3,14 +3,16 @@
|
||||
///<amd-dependency path="../components/panelmeta" />
|
||||
|
||||
import PanelMeta = require('../components/panelmeta');
|
||||
import FileSearcher = require('./fileSearcher');
|
||||
|
||||
class Base {
|
||||
|
||||
constructor() {
|
||||
var test = new FileSearcher();
|
||||
test.getFiles();
|
||||
}
|
||||
|
||||
public getName() : string {
|
||||
debugger;
|
||||
return "asd";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user