There seems to be an issue in this particular section.
if (components[i] == **TextOptionType**) {
I am currently debugging a plugin for a software called Obsidian.
The file ~ObsidianDevLibrary.ts can be found under the Importing directory as ~type.ts.
One problem I am facing is referencing TextOptionType as a value.
What steps should I take to resolve this?
type.ts
export type TextOptionType = {
[propName: string] : any,
key: string,
placeholder?: string,
autoSave?: boolean,
value?: boolean,
onChange?: onChangeType,
}
ObsidianDevLibrary.ts
for (let i = 0; i < components.length; i++) {
if (components[i] == TextOptionType) {
componentsToReturn.push(this.addText(setting, components[i]))
}
}
It's possible that comparing TextOptionType with 'if' might not be correct syntax, but the right approach eludes me.
This could be an attempt to validate the data entering the component is properly formatted.