Skip to content

Readme contains code that does not typecheck #17

@lexidor

Description

@lexidor
use type Slack\Hack\JsonSchema\Codegen\Codegen;

$schemas = vec['/path/to/json-schema-1.json', '/path/to/json-schema-2.json', '/path/to/json-schema-3.json'];
Codegen::forPaths($schemas, shape(
  'validator' => shape(
    'refs' => shape(
       'unique' => shape(
          'source_root' => '/path/to',
          'output_root' => '/path/gen'
        )
     )
  ),
))->build();
Typing[4053] No method 'build' in vec
   --> file.hack
 19 |   ))->build();
    |       ^^^^^
   --> vendor/slack/hack-json-schema/src/Codegen/Codegen.php
123 |   ): vec<Codegen> {
    |      ^^^^^^^^^^^^ This is why I think it is an object of type vec
   --> /tmp/hh_server/hhi_356191d8/hackarray.hhi
 13 | abstract final class vec<+T> implements KeyedContainer<int, T>, XHPChild {}
    |                      ^^^ Declaration of vec is here

1 error found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions