(def: unknown, ctx: BaseParseContext)
| 652 | } |
| 653 | |
| 654 | parseOwn(def: unknown, ctx: BaseParseContext): BaseRoot { |
| 655 | const isScopeAlias = ctx.alias && ctx.alias in this.aliases |
| 656 | |
| 657 | // if the definition being parsed is not a scope alias and is not a |
| 658 | // generic instantiation (i.e. opts don't include args), add `this` as a resolution. |
| 659 | |
| 660 | // if we're parsing a nested string, ctx.args will have already been set |
| 661 | if (!isScopeAlias && !ctx.args) ctx.args = { this: ctx.id } |
| 662 | |
| 663 | const result = parseInnerDefinition(def, ctx) |
| 664 | |
| 665 | if (isArray(result)) { |
| 666 | if (result[1] === "=") return throwParseError(shallowDefaultableMessage) |
| 667 | |
| 668 | if (result[1] === "?") return throwParseError(shallowOptionalMessage) |
| 669 | } |
| 670 | |
| 671 | return result |
| 672 | } |
| 673 | |
| 674 | unit: UnitTypeParser<$> = value => this.units([value]) as never |
| 675 |
no test coverage detected