Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ignatandrei/RSCG_UtilityTypes

Omit and Pick from TypeScript : https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys
https://github.com/ignatandrei/RSCG_UtilityTypes

Last synced: about 2 months ago
JSON representation

Omit and Pick from TypeScript : https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys

Awesome Lists containing this project

README

        

# RSCG_UtilityTypes

Omit and Pick from TypeScript : https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys

generating also extension for converting from one type to another . See demo project.

## Usage

Add to your csproj file
```xml



```

In C# 9.0

```csharp
[Omit("MoviePreviewSmall", nameof(Actors),nameof(Year))]
[Pick("MoviePreviewMinimal", nameof(Title), nameof(Year))]
public class Movie
{
public string? Title { get; set; }
public string? Director { get; set; }
public int Year { get; set; }
public string[]? Actors { get; set; }
}
```

And 2 new classes will be generated , MoviePreviewSmall and MoviePreviewMinimal

# More Roslyn Source Code Generators

You can find more RSCG with examples at [Roslyn Source Code Generators](https://ignatandrei.github.io/RSCG_Examples/v2/)