			new Scanner(def),
			[],
			this.createParseContext({
				...opts,
				def,
				prefix: "generic"
			})
		)
	}

	protected normalizeRootScopeValue(resolution: unknown): unknown {
		if (isThunk(resolution) && !hasArkKind(resolution, "generic"))
			return resolution()
		return resolution
	}

	protected preparseOwnDefinitionFormat(
		def: unknown,
		opts: BaseParseOptions
	): BaseRoot | BaseParseContextInput {
		return {
			...opts,
			def,
			prefix: opts.alias ?? "type"
		}
	}

	parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot {
		const isScopeAlias = ctx.alias && ctx.alias in this.aliases

		// if the definition being parsed is not a scope alias and is not a
			]) as never
		)
	}

	protected preparseOwnAliasEntry(alias: string, def: unknown): AliasDefEntry {
		const firstParamIndex = alias.indexOf("<")
		if (firstParamIndex === -1) {
			if (hasArkKind(def, "module") || hasArkKind(def, "generic"))
				return [alias, def]

			const qualifiedName =
				this.name === "ark" ? alias
				: alias === "root" ? this.name
				: `${this.name}.${alias}`

			const config = this.resolvedConfig.keywords?.[qualifiedName]

			if (config) def = [def, "@", config] satisfies TupleExpression

			return [alias, def]
		}

		if (alias[alias.length - 1] !== ">") {
			throwParseError(
				`'>' must be the last character of a generic declaration in a scope`
			)
