Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Trouble getting field to propagate down #975

Answered by mpvl
jszwedko asked this question in Q&A
Discussion options

You must be logged in to vote

BTW, you could also avoid having to "pass down" values too much by using nested definitions. The following will yield the same results:

installation: {
	#OperatingSystem: {
		interfaces: [...installation.#Interface & {_shell: shell}]
		interfaces: [_]
		name:  string
		shell: string
	}

	#OperatingSystems: [Name=string]: #OperatingSystem & {
		name: Name
	}

	operating_systems: #OperatingSystems
}

installation: {
	#Interface: {
		_shell: string | *null

		paths: {
			bin:         string | null
			bin_in_path: bool | null
			config:      string | null
		}

		role_implementations: #RoleImplementations
		name:                 string

		#RoleImplementations: [Name=string]: #RoleImplementatio…

Replies: 3 comments 2 replies

Comment options

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

Comment options

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

Answer selected by jszwedko
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants