-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'explicit-nullable-arrays-fix'
- Loading branch information
Showing
19 changed files
with
117 additions
and
77 deletions.
There are no files selected for viewing
10 changes: 3 additions & 7 deletions
10
TypeScript.ContractGenerator.Tests/Files/CustomGenerator/array-types.expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
TypeScript.ContractGenerator.Tests/Files/CustomGenerator/array-types.expected.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
TypeScript.ContractGenerator.Tests/Files/Options.Expected/explicit-nullability-disabled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
TypeScript.ContractGenerator.Tests/Files/Options.Expected/explicit-nullability-disabled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
TypeScript.ContractGenerator.Tests/Files/Options.Expected/explicit-nullability-enabled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
TypeScript.ContractGenerator.Tests/Files/Options.Expected/explicit-nullability-enabled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
TypeScript.ContractGenerator.Tests/Files/SimpleGenerator/array-types.expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
TypeScript.ContractGenerator.Tests/Files/SimpleGenerator/array-types.expected.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
TypeScript.ContractGenerator.Tests/Types/ExplicitNullabilityRootType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace SkbKontur.TypeScript.ContractGenerator.Tests.Types | ||
{ | ||
public class ExplicitNullabilityRootType | ||
{ | ||
[NotNull] | ||
public SomeClass SomeNotNullClass { get; set; } | ||
|
||
public SomeClass SomeNullableClass { get; set; } | ||
|
||
[NotNull] | ||
public string NotNullString { get; set; } | ||
|
||
public string NullableString { get; set; } | ||
|
||
public int NotNullInt { get; set; } | ||
|
||
public int? NullableInt { get; set; } | ||
|
||
[NotNull] | ||
public int[] NotNullArray { get; set; } | ||
|
||
public int[] NullableArray { get; set; } | ||
|
||
[NotNull] | ||
public int?[] NotNullNullablesArray { get; set; } | ||
|
||
public int?[] NullableNullablesArray { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
TypeScript.ContractGenerator/CodeDom/FlowTypeOrNullType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace SkbKontur.TypeScript.ContractGenerator.CodeDom | ||
{ | ||
public class FlowTypeOrNullType : FlowTypeUnionType | ||
{ | ||
public FlowTypeOrNullType(FlowTypeType innerType) | ||
: base(new[] | ||
{ | ||
new FlowTypeBuildInType("null"), | ||
innerType | ||
}) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters