Skip to content

config.get does not return expected value if passing type argument #10048

@DanTup

Description

@DanTup
  • VSCode Version: 1.3.1
  • OS Version: Windows 10

Added a configuration option that's a boolean to my packages.json:

"configuration": {
    "type": "object",
    "title": "Dart Configuration",
    "properties": {
        "dart.setIndentSettings": {
            "type": "boolean",
            "default": true,
            "description": "Forces indenting with two spaces when Dart files are opened. This is on by default because VS Code doesn't support per-language settings and most people use tabs/4 spaces for other languages."
        }
    }
}

When I come to read it with config.get<boolean>("setIndentSettings") it comes back as undefined, yet config.get("setIndentSettings") returns false!

From my debug console:

$ config.get<boolean>("setIndentSettings")
  not available
$ config.get("setIndentSettings")
  false
$ typeof config.get("setIndentSettings")
  "boolean"

Metadata

Metadata

Assignees

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