{"id":17255569,"url":"https://github.com/ffmathy/fluffyspoon.javascript.csharptotypescriptgenerator","last_synced_at":"2025-04-14T00:18:25.080Z","repository":{"id":21026716,"uuid":"91628138","full_name":"ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator","owner":"ffMathy","description":"A flexible CSharp to TypeScript generator that is Gulp, Webpack and Grunt friendly, written in TypeScript.","archived":false,"fork":false,"pushed_at":"2023-04-07T19:46:02.000Z","size":569,"stargazers_count":48,"open_issues_count":12,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T06:30:19.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffMathy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"ffMathy","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-05-17T23:16:16.000Z","updated_at":"2024-11-25T18:03:30.000Z","dependencies_parsed_at":"2023-09-26T11:13:38.634Z","dependency_job_id":null,"html_url":"https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator","commit_stats":{"total_commits":226,"total_committers":8,"mean_commits":28.25,"dds":"0.15486725663716816","last_synced_commit":"1b63b253a40c689961a8df34d8ed3556422e2e9a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.CSharpToTypeScriptGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.CSharpToTypeScriptGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.CSharpToTypeScriptGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.CSharpToTypeScriptGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffMathy","download_url":"https://codeload.github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799979,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T07:12:03.632Z","updated_at":"2025-04-14T00:18:25.054Z","avatar_url":"https://github.com/ffMathy.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ffMathy"],"categories":[],"sub_categories":[],"readme":"A flexible CSharp to TypeScript generator that is `Gulp`, `Webpack` and `Grunt` friendly, written in TypeScript.\n\nUses the following library for parsing C# code from TypeScript: https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpParser\n\n# Wrappers for build runners\n- **Gulp:** https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator.Gulp\n- **Grunt:** https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator.Grunt\n- **Webpack:** https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator.Webpack\n\n# Configuration\nTo see all available settings, [look at the configuration options here](doc/CONFIGURATION.md).\n\n# Usage examples\nThese recipes help you quickly get started with common scenarios you may need. Feel free to contribute with your own!\n\nThe following code shows general usage. The examples below only differ in the `EmitOptions` provided.\n\n```typescript\nimport { Emitter } from '@fluffy-spoon/csharp-to-typescript-generator';\n\nvar csharpCode = \"insert the CSharp model code here - you could also read it from a file.\";\nvar emitter = new Emitter(csharpCode);\nvar options = \u003cEmitOptions\u003e{ \n  defaults: \u003cDefaultEmitOptions\u003e{ },\n  file: \u003cFileEmitOptions\u003e{ }\n};\nvar typescriptCode = emitter.emitFile(options);\n```\n\n- To see the definitions of each C# type such as `CSharpType`, look here: https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpParser/blob/master/dist/src/Models.ts\n- To see the definitions of each option type such as `FileEmitOptions`, look here: https://github.com/ffMathy/FluffySpoon.JavaScript.CSharpToTypeScriptGenerator/blob/master/dist/src/Index.d.ts\n\n## Default settings\n```typescript\nvar typescriptCode = emitter.emit();\n```\n\nGiven the following CSharp model code:\n\n```csharp\nnamespace MyNamespace {\n  public class MyClass {\n    public bool myField;\n  \n    public int MyProperty { get; set; }\n    public string MyOtherProperty { get; set; }\n    public double? MyNullableProperty { get; set; }\n    \n    public class MySubclass {\n      public List\u003cstring\u003e MyListProperty { get; set; }\n      public MyGenericType\u003cSomeType, SomeOtherType\u003e MyGenericProperty { get; set; }\n      public Task MyFunction(string input1, int input2) { \n        //some code\n      }\n    }\n  }\n}\n```\n\nThe following TypeScript code would be generated:\n\n```typescript\ndeclare namespace MyNamespace {\n  interface MyClass {\n    myField: boolean;\n    myProperty: number;\n    myOtherProperty: string;\n    myNullableProperty?: number;\n  }\n  \n  namespace MyClass {\n    interface MySubclass {\n      myListProperty: string[];\n      myGenericProperty: MyGenericType\u003cSomeType, SomeOtherType\u003e;\n      MyFunction(input1: string, input2: number): Promise;\n    }\n  }\n}\n```\n\nBut this framework is flexible! Look at the recipes to get inspiration, or the other configurations available.\n\n## Recipes for frameworks \u0026 libraries\nTo see pre-made examples designed for frameworks like Angular and ASP .NET Core (for instance for auto-generating HTTP clients for each controller action), go [see the framework recipes here](doc/recipes/FRAMEWORKS.md).\n\n## Other recipes\nTo see all other examples for common use cases, go [see the other recipes here](doc/recipes/OTHER.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.csharptotypescriptgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.csharptotypescriptgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.csharptotypescriptgenerator/lists"}