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

v3 #62

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft

v3 #62

wants to merge 48 commits into from

Conversation

rubenvanassche
Copy link
Member

This is all work in progress - a complete rewrite of ts transformer

@innocenzi
Copy link
Contributor

@rubenvanassche has this been abandoned? Do you think I can PR back something that fixes #23 in v2?

I am still using this writer in all my projects to this day 🥲

final class OptionalPropertiesTypeDefinitionWriter extends TypeDefinitionWriter
{
    public function format(TypesCollection $collection): string
    {
        return str(parent::format($collection))
            ->replaceMatches('/(\w+)\??: ([\w\. |<>]+) \| null;/', function ($matches) {
                return \sprintf('%s?: %s', $matches[1], $matches[2]);
            })
            ->toString();
    }
}

@rubenvanassche
Copy link
Member Author

Not abandonned, just a lot of other things I'm working on internally which makes it complicated to work on this. As for your PR, @sebastiandedeyne will take a look at what such changes would mean for our projects and if it would be useful.

@innocenzi
Copy link
Contributor

Thanks for the answer @rubenvanassche!

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