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

Readme contains code that does not typecheck #17

Open
lexidor opened this issue Oct 18, 2019 · 0 comments
Open

Readme contains code that does not typecheck #17

lexidor opened this issue Oct 18, 2019 · 0 comments

Comments

@lexidor
Copy link
Contributor

lexidor commented Oct 18, 2019

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.
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

No branches or pull requests

1 participant