Skip to content

Commit

Permalink
Incorporate last round of Spec team discussion
Browse files Browse the repository at this point in the history
Expand the full form to include `Params` as an intermediate term in the
signature, so that other things can slot in as peers to it in the
future if or when that makes sense, and so that it makes sense what
exactly is being named as a `Positional` field there.
  • Loading branch information
chriskrycho committed Mar 16, 2022
1 parent 27a933c commit c81d758
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions text/0748-glimmer-component-signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ Two points to notice about the signature:
// arguments, and could be reused for helpers, modifiers, etc.
interface InvokableSignature {
Args?: {
Named?: Record<string, unknown>;
Named?: {
[argName: string]: unknown;
};
Positional?: unknown[];
};
}
Expand All @@ -123,14 +125,18 @@ interface InvokableComponentSignature extends InvokableSignature {
Element?: Element | null;
Blocks?: {
[blockName: string]: {
Positional?: unknown[];
Params?: {
Positional?: unknown[];
};
}
}
}

interface InvokableGlimmerComponentSignature extends InvokableComponentSignature {
Args?: {
Named?: Record<string, unknown>;
Named?: {
[argName: string]: unknown;
};
// empty tuple here means it does not allow *any* positional params
Positional?: [];
}
Expand All @@ -150,8 +156,8 @@ interface GlimmerComponentSignature {
[argName: string]: unknown;
};
Blocks?: {
[blockName: string]: unknown[]
}
[blockName: string]: unknown[];
};
Element?: Element | null;
}
```
Expand Down

0 comments on commit c81d758

Please sign in to comment.