Search This Blog

2023/09/10

Typescript:noUnusedParameters flag in tsconfig.json

 In tsconfig.json there is flag called noUnusedParameters if it set to true

it will give error if a parameter in function is not used in it

const createDefaultKeyboard = (modelID: number) => {
const defaultModelID = 23;
return { type: "keyboard", modelID: defaultModelID };
};


Here we get error on variable modelID as it is not used.

No comments:

Post a Comment