Comment

Comment by 9034725985

If I set input as Object,

    if (input[prefCode] !== null) {
        currentValue = input[prefCode].toString();
    }
in the lines above, I see a red underline under input[prefCode]

> Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053)

parent 9034725985 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton