Skip to content

Commit

Permalink
Merge pull request #59 from southworks/2.1.0
Browse files Browse the repository at this point in the history
update package.json and package-lock.json
  • Loading branch information
sancalle authored Oct 14, 2022
2 parents cb41de5 + f6ee93b commit 48f3108
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 74 deletions.
73 changes: 4 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,9 @@ For example:

# Support

## Constants/Variables

#### Examples

|TS|C#|GO|Visual Basic
|-|-|-|-|
|`const CONST_VALUE: string = "THIS IS A CONSTANT";`|`public const string CONST_VALUE = "THIS IS A CONSTANT";`|`const CONST_VALUE string = "THIS IS A CONSTANT"`|`Const CONST_VALUE As String = "THIS IS A CONSTANT"`|
|`let foo: number = 50;`|`public static int Foo = 50;`|`var Foo int = 50`|`Dim Foo AS Integer = 50`
|`var foo: number = 50;`|`public static int Foo = 50;`|`var Foo int = 50`|`Dim Foo AS Integer = 50`

- In C# those are wrapped into a static class

```csharp
namespace xxx
{
public static class Helper
{
public static int Foo = 50;
}
}
```
Fully documented support at [Wiki](https://github.com/southworks/codeverter/wiki)

#### Support
## Constants/Variables

||C#|GO|Visual Basic|
|-|-|-|-|
Expand All @@ -116,16 +96,6 @@ namespace xxx

## Enums

#### Examples

|TS|C#|GO|Visual Basic|
|-|-|-|-|
|<pre><code>export enum Animals {<div> Dog = 1,</div><div> Cat = 2</div>}</code></pre>|<pre><code>public enum Animals<div>{</div><div> Dog = 1,</div><div> Cat = 2</div>}</code></pre>|<pre><code>const (<div> Dog int = 1</div><div> Cat = 2</div>)</code></pre>|<pre><code>Enum Animals<div></div><div> Dog = 1</div><div> Cat = 2</div>End Enum</code></pre>|
|<pre><code>export enum Animals {<div> Dog = "dog",</div><div> Cat = "cat"</div>}</code></pre>|<pre><code>public enum Animals<div>{</div><div> Dog = "dog",</div><div> Cat = "cat"</div>}</code></pre>|<pre><code>const (<div> Dog string = "dog"</div><div> Cat = "cat"</div>)</code></pre>|<pre><code>Enum Animals<div></div><div> Dog</div><div> Cat</div>End Enum</code></pre>|
|<pre><code>export enum Animals {<div> Dog,</div><div> Cat</div>}</code></pre>|<pre><code>public enum Animals {<div> Dog,</div><div> Cat</div>}</code></pre>|<pre><code>const (<div> Dog int = iota</div><div> Cat</div>)</code></pre>|<pre><code>Enum Animals<div></div><div> Dog</div><div> Cat</div>End Enum</code></pre>|

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Numeric|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
Expand All @@ -134,14 +104,6 @@ namespace xxx

## Interfaces

#### Examples

|TS|C#|GO|Visual Basic|
|-|-|-|-|
|<pre><code>export interface Printable {<div> content: string;</div><div> doPrint(): void;</div>}</code></pre>|<pre><code>public interface IPrintable<div>{</div><div> string Content { get; set; }</div><div> void DoPrint();</div>}</code></pre>|<pre><code>type Printable interface {<div> DoPrint()</div>}</code></pre>|<pre><code>Public Interface IPrintable<div></div><div> Property Content As String</div><div> Sub DoPrint()</div>End Interface</code></pre>|

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Members|:heavy_check_mark:|:x:|:heavy_check_mark:|
Expand All @@ -151,8 +113,6 @@ namespace xxx

## Classes

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Inheritance|:heavy_check_mark:|:heavy_check_mark:*|:heavy_check_mark:|
Expand All @@ -161,19 +121,11 @@ namespace xxx
|Static|P|P||

_*In a go way, using composition_

_\*\*Using naming conventions_

### Constructors

#### Examples

Consider a class named **Cat**
|TS|C#|GO|Visual Basic|
|-|-|-|-|
|<pre><code>constructor(arg: number) {<div> /\*content*/</div>}</code></pre>|<pre><code>public Cat(int arg)<div>{</div><div> // /\*content*/</div>}</code></pre>|<pre><code>func NewCat(arg int) \*Cat {<div> c := Cat{}</div><div> // /\*content*/</div><div> return &c</div>}</code></pre>|<pre><code>Public Sub Cat(arg As Integer)<div></div><div> // /\*content*/</div>End Sub</code></pre>|

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Visibility|:heavy_check_mark:|:x:|:heavy_check_mark:|
Expand All @@ -182,16 +134,6 @@ Consider a class named **Cat**

### Properties

#### Examples

|TS|C#|GO|Visual Basic|
|-|-|-|-|
|`public name: string;`|`public string Name { get; set; }`|`Name string`|`Public Property Name AS String`|
|`protected name: string;`|`protected string Name { get; set; }`|`name string`|`Protected Property Name AS String`|
|`private name: string;`|`private string Name { get; set; }`|`name string`|`Private Property Name AS String`|

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Visibility|:heavy_check_mark:|:heavy_check_mark:*|:heavy_check_mark:|
Expand All @@ -200,14 +142,6 @@ _*Naming convention for pubic or private, protected is considered private_

### Methods/Functions

#### Examples

||C#|GO|Visual Basic|
|-|-|-|-|
|<pre><code>public foo(): void {<div> /* a lot of work! */ </div>}</code></pre>|<pre><code>public void Foo()<div>{</div><div> ///\* a lot of work! */</div><div> return;</div>}</code></pre>|<pre><code>func (f \*Cat) Foo() {<div> ///\* a lot of work! */</div><div> return</div>}</code></pre>|<pre><code>Public Sub Foo()<div></div><div> ' /* a lot of work! */</div><div></div>End Sub</code></pre>

#### Support

||C#|GO|Visual Basic|
|-|-|-|-|
|Visibility|:heavy_check_mark:|:heavy_check_mark:*|:heavy_check_mark:|
Expand All @@ -216,4 +150,5 @@ _*Naming convention for pubic or private, protected is considered private_
|Default return value|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:**|

_*Naming convention for pubic or private, protected is considered private_

_\*\*As functions_
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@southworks/codeverter",
"version": "2.0.3",
"version": "2.1.0",
"description": "Convert TypeScript code into different languages",
"main": "lib/lib.js",
"bin": {
Expand Down Expand Up @@ -67,4 +67,4 @@
}
}
}
}
}

0 comments on commit 48f3108

Please sign in to comment.