Skip to content

Can not save object correctly #727

@zzzgit

Description

@zzzgit
class Entity{

	#id

	#content

	get id(){
		return this.#id
	}

	set id(value){
		this.#id = value
	}

	set content(value){
		this.#content = value
	}

	get content(){
		return this.#content
	}
}

This is just a simple class. I can instantiate it like this:

let entity = new Entity()

Now, I will dump it:

const yamlStr = yaml.dump(entity)
await writeToFile(thePath, yamlStr)

It just becomes an empty object in the yaml:
{}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions