Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/generation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"nette/php-generator": "4.2.1",
"nette/schema": "^1.3.4",
"nikic/php-parser": "^5.3",
"tempest/container": "3.x-dev",
"tempest/support": "3.x-dev",
"psr/container": "^2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/generation/src/TypeScript/GenerateTypesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Tempest\Generation\TypeScript;

use Psr\Container\ContainerInterface;
use Tempest\Console\ConsoleCommand;
use Tempest\Console\HasConsole;
use Tempest\Container\Container;

final readonly class GenerateTypesCommand
{
Expand All @@ -15,7 +15,7 @@
public function __construct(
private TypeScriptGenerationConfig $config,
private TypeScriptGenerator $generator,
private Container $container,
private ContainerInterface $container,
) {}

#[ConsoleCommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Tempest\Generation\TypeScript\StructureResolvers;

use Tempest\Container\Container;
use Psr\Container\ContainerInterface;
use Tempest\Generation\TypeScript\InterfaceDefinition;
use Tempest\Generation\TypeScript\PropertyDefinition;
use Tempest\Generation\TypeScript\StructureResolver;
Expand All @@ -25,7 +25,7 @@
{
public function __construct(
private TypeScriptGenerationConfig $config,
private Container $container,
private ContainerInterface $container,
) {}

public function resolve(TypeReflector $type, TypeScriptGenerator $generator): InterfaceDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Tempest\Generation\TypeScript\StructureResolvers;

use Psr\Container\ContainerInterface;
use ReflectionEnumBackedCase;
use ReflectionEnumUnitCase;
use RuntimeException;
use Tempest\Container\Container;
use Tempest\Generation\TypeScript\StructureResolver;
use Tempest\Generation\TypeScript\TypeDefinition;
use Tempest\Generation\TypeScript\TypeNodes\TypeNode;
Expand All @@ -23,7 +23,7 @@
{
public function __construct(
private TypeScriptGenerationConfig $config,
private Container $container,
private ContainerInterface $container,
) {}

public function resolve(TypeReflector $type, TypeScriptGenerator $generator): TypeDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Tempest\Generation\TypeScript;

use Tempest\Core\Priority;
use Tempest\Discovery\Discovery;
use Tempest\Discovery\DiscoveryLocation;
use Tempest\Discovery\IsDiscovery;
use Tempest\Reflection\ClassReflector;
use Tempest\Support\Priority;

use function Tempest\Support\arr;

Expand All @@ -25,7 +25,7 @@
if ($class->implements(TypeResolver::class)) {
$this->discoveryItems->add($location, [
$class->getName(),
$class->getAttribute(Priority::class)->priority ?? Priority::NORMAL,

Check failure on line 28 in packages/generation/src/TypeScript/TypeResolverDiscovery.php

View workflow job for this annotation

GitHub Actions / Run static analysis: PHPStan

Class Tempest\Support\Priority not found.

Check failure on line 28 in packages/generation/src/TypeScript/TypeResolverDiscovery.php

View workflow job for this annotation

GitHub Actions / Run static analysis: PHPStan

Access to property $priority on an unknown class Tempest\Support\Priority.

Check failure on line 28 in packages/generation/src/TypeScript/TypeResolverDiscovery.php

View workflow job for this annotation

GitHub Actions / Run static analysis: PHPStan

Access to constant NORMAL on an unknown class Tempest\Support\Priority.
]);
}
}
Expand Down
Loading