Skip to content

Commit

Permalink
Module imports don't need .ts (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccolgrove authored and ryanmcnamara committed Apr 21, 2016
1 parent bae91fc commit 4a6bab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ public void generateTypescriptService(Class<?> serviceClass, List<Type> addition

ServiceModel serviceModel = new ServiceClassParser().parseServiceClass(serviceClass, settings, serviceClassesToMerge);
ServiceEmitter serviceEndpointEmitter = new ServiceEmitter(serviceModel, settings, writer);

if (settings.emitES6()) {
String generatedInterfacePrefix = settings.generatedInterfacePrefix();
String endpointOptionsName = generatedInterfacePrefix + "HttpEndpointOptions";
String apiBridgeName = generatedInterfacePrefix + "HttpApiBridge";
writer.writeLine("import { " + endpointOptionsName + ", " + apiBridgeName + " } from \"./httpApiBridge.ts\";");
writer.writeLine("import { " + endpointOptionsName + ", " + apiBridgeName + " } from \"./httpApiBridge\";");
}

serviceEndpointEmitter.emitTypescriptTypes(settings, additionalClassesToOutput);
serviceEndpointEmitter.emitTypescriptInterface();
serviceEndpointEmitter.emitTypescriptClass();
Expand All @@ -96,7 +96,7 @@ private void beginService(IndentedOutputWriter writer, String subModuleName) {
moduleName += "." + subModuleName;
}
writer.writeLine("module " + moduleName + " {");
writer.increaseIndent();
writer.increaseIndent();
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright
// Generated
import { HttpEndpointOptions, HttpApiBridge } from "./httpApiBridge.ts";
import { HttpEndpointOptions, HttpApiBridge } from "./httpApiBridge";

export interface SimpleService1 {
method1(): FooReturn<string>;
Expand Down

0 comments on commit 4a6bab3

Please sign in to comment.