Skip to content

Commit

Permalink
Merge branch 'dev_tsplugin'
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Apr 30, 2020
2 parents b1aa23a + 18db89f commit cd1d785
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cobigen/cobigen-tsplugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>tsplugin</artifactId>
<name>CobiGen - TypeScript Plug-in</name>
<version>2.4.2</version>
<version>2.4.3</version>
<packaging>jar</packaging>
<description>CobiGen - TypeScript Plug-in</description>

Expand All @@ -15,7 +15,7 @@
<properties>
<plugin.name>${project.artifactId}</plugin.name>
<server.name>nestserver</server.name>
<server.version>1.1.2</server.version>
<server.version>1.1.5</server.version>
<server.url>https\://registry.npmjs.org/@devonfw/cobigen-nestserver/-/cobigen-nestserver-${server.version}.tgz</server.url>
<server.url.linux>https\://registry.npmjs.org/@devonfw/cobigen-nestserver-linux/-/cobigen-nestserver-linux-${server.version}.tgz</server.url.linux>
<server.url.macos>https\://registry.npmjs.org/@devonfw/cobigen-nestserver-macos/-/cobigen-nestserver-macos-${server.version}.tgz</server.url.macos>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,17 @@ private String readTSFile(String fileName) {
return returnString;
}

/**
* Tests if TypeScript can handle null- and undefined-aware types
*
* @test fails
*/
@Test
public void testNullAndUndefinedTypes() {
TypeScriptMerger tsMerger = new TypeScriptMerger("tsmerge", false);
File baseFile = new File(testFileRootPath + "nullBase.ts");
String mergedContents = tsMerger.merge(baseFile, readTSFile("nullPatch.ts"), "UTF-8");
assertEquals(false, mergedContents.contains("Not able to merge") || mergedContents.isEmpty());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export class SomeDataList {
somedataSearchCriteria: SomeDataSearchCriteria = {
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export class SomeDataList {
somedataSearchCriteria: SomeDataSearchCriteria = {
AnyString: null,
AnotherString: undefined,
};
}
2 changes: 1 addition & 1 deletion documentation/master-cobigen.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This document contains the documentation of the CobiGen core module as well as a
* CobiGen v6.1.0
* CobiGen - Java Plug-in v2.2.0
* CobiGen - XML Plug-in v4.2.0
* CobiGen - TypeScript Plug-in v2.4.2
* CobiGen - TypeScript Plug-in v2.4.3
* CobiGen - Property Plug-in v2.1.0
* CobiGen - Text Merger v2.1.0
* CobiGen - JSON Plug-in v2.1.0
Expand Down

0 comments on commit cd1d785

Please sign in to comment.