TypeScript Class Causes 404 Can't Find JavaScript
I'm trying to create models and utilities in TypeScript to have nice things. When I add a file to any folder and upload the .js module to the server I get an error stating "http://myServerName/myviewer/geocortex/namespace/WebSocket/Models.js 404 (Not Found)"
No "Models.js" is output from the build process. From what I can see it is output into the "WebSocket.js".
_img_ alt="Folder structure the source code is in" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906f2000000XbtZ&feoid=Body&refid=0EMf2000000YAls"_/_img_
/// <reference path="./../../_Definitions/Framework.AMD.d.ts"/>
export class DataDownload {
workspace: string;
timeRequested: string;
urlPrefix: string;
ws_topic: string;
NumFeaturesOutput: number;
downloadUrl: string;
requestedKeyword: string;
timeStarted: string;
OutputLocation: string;
repository: string;
jobsuccess_topic: string;
LogFileName: string;
jobfailure_topic: string;
StatusMessage: string;
ResultRootDir: string;
StatusNumber: string;
timeFinished: string;
subscriber_folder: string;
id: string;
logHome: string;
logUrl: string;
static createFromJson(json: Object): DataDownload {
let fmeAsyncResp: DataDownload = new DataDownload();
return $.extend(fmeAsyncResp, json);
}
}
Above is the source code for the class.
Does anyone know why my WebSocket.js file would give me this error?
Why is it looking for models.js?
0
-
More Information:
Viewer is 2.10
GE is 4.9.2
Using the new Gulp build method0 -
Hi Matthew,
I checked with a developer and they tell me that your type name needs a shim. Can you post your viewer configuration where you try to load the viewer?
If the shim is not defined in the viewer config, then dojo will try to find and download the module code, rather than finding all of it in the compiled module.
Let me know if this makes sense - it's not as obvious as I'd like but I'm also not a javascript/typescript developer.
Regards,
-Malcolm0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare