Skip to content

Broken hoisted variable #103

@ccorcos

Description

@ccorcos

I get an error that result is not defined.

class Storage {
	// lru calls this callback synchronously
	public get(key: string): Value | null {
		let result: Value
		lru.getItem(this.makeKey(key), this.getOptions, (err, value) => {
			result = value
		})
		return result
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions