Skip to content

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!

@sovrin
Copy link

sovrin commented Jan 7, 2025

Thank you for your huge efforts!
Is there any way one can assist you with coding or testing?

@spatie-bot
Copy link

Dear contributor,

because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it.

@spatie-bot spatie-bot closed this May 8, 2025
@rubenvanassche rubenvanassche reopened this May 8, 2025
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.

4 participants