Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Interfaces implements and Interfaces extensions #102

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

Allov
Copy link
Contributor

@Allov Allov commented Feb 29, 2020

Adding support for Interfaces implements and Interfaces extensions in the typescript templates.

Attempt to fix #98 .

It should cover cases like these:

Foo.cs

using System;
using TypeGen.Core.TypeAnnotations;

namespace foo
{
    [ExportTsClass]
    public class Foo : Bar, Car
    {
        public Car Car {get;set;}
        public string Far {get;set;}
    }

    public interface Bar : Far
    {

    }

    public interface Far
    {
        string Far {get;set;}
    }

    public interface Car
    {

    }
}

bar.ts

import { Far } from "./far";

export interface Bar extends Far {

}

car.ts

export interface Car {

}

far.ts

export interface Far {
    far: string;
}

foo.ts

import { Bar } from "./bar";
import { Far } from "./far";
import { Car } from "./car";

export class Foo implements Bar, Far, Car {
    car: Car;
    far: string;
}

@jburzynski jburzynski merged commit d2e3aee into jburzynski:dev Mar 31, 2020
jburzynski added a commit that referenced this pull request Mar 31, 2020
@Allov Allov deleted the add-implements-support branch July 10, 2020 20:13
tterrag1098 pushed a commit to tterrag1098/TypeGen that referenced this pull request Dec 15, 2023
Adding support for Interfaces implements and Interfaces extensions
tterrag1098 pushed a commit to tterrag1098/TypeGen that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants