We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
;
; are not allowed in type-definitions: expected identifier or '}', got ";"
expected identifier or '}', got ";"
using a , instead of ; works
,
paste the following into Permission Rules at Ory Network:
Permission Rules
import { Namespace, SubjectSet, Context } from '@ory/keto-namespace-types'; class User implements Namespace { related: { manager: User[]; }; } class Group implements Namespace { related: { members: (User | Group)[]; }; } class Folder implements Namespace { related: { parents: Folder[]; viewers: SubjectSet<Group, 'members'>[]; }; permits = { view: (ctx: Context): boolean => this.related.viewers.includes(ctx.subject) || this.related.parents.traverse((p) => p.permits.view(ctx)), }; } class File implements Namespace { related: { parents: Folder[]; viewers: (User | SubjectSet<Group, 'members'>)[]; owners: (User | SubjectSet<Group, 'members'>)[]; }; // Some comment permits = { view: (ctx: Context): boolean => this.related.parents.traverse((p) => p.permits.view(ctx)) || this.related.viewers.includes(ctx.subject) || this.related.owners.includes(ctx.subject), edit: (ctx: Context) => this.related.owners.includes(ctx.subject), }; }
The ts-file is formatted with prettier (with single-quote option)
No response
Ory Network (15.11.2022)
Ory Network
The text was updated successfully, but these errors were encountered:
feat: support semicolons in types
f4c9ae0
fixes #1135
fd5fdfe
feat: support semicolons in types (#1151)
a06eda7
hperl
Successfully merging a pull request may close this issue.
Preflight checklist
Describe the bug
;
are not allowed in type-definitions:expected identifier or '}', got ";"
using a
,
instead of;
worksReproducing the bug
paste the following into
Permission Rules
at Ory Network:The ts-file is formatted with prettier (with single-quote option)
Relevant log output
Relevant configuration
No response
Version
Ory Network (15.11.2022)
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response
The text was updated successfully, but these errors were encountered: