Skip to content

Which is the correct syntax to pass constructor arguments? #80

Answered by rubensworks
renyuneyun asked this question in Q&A
Discussion options

You must be logged in to vote

On the other hand, in this section in Workflow Typescript, it says "MyComponent:_name": "John" is the way to supply argument "John" to the name parameter.

Hmm, that one is in fact incorrect. It is missing the context of my-package. (feel free to submit a PR to fix this)

However, once that context is present, both "name" and "MyComponent:_name" are in fact accepted.
This is because using this JSON-LD context, they both expand to the same property URL.

The availability of the shorter "name" was added only very recently, so that's why some places may still be using the old (but still valid) "MyComponent:_name" version. (if you find any, PRs are welcome! :-))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@renyuneyun
Comment options

Answer selected by renyuneyun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants