Backend/꾸준히 TIL
Type number trivaially inferred from a number literal, remove type annotation 에러 해결
개발하는 후딘
2022. 11. 3. 11:33
728x90
반응형
Type (number, boolean, string , ... ) trivaially inferred from a number literal, remove type annotation
해결방안
export const calculatePaymentPrice = (
totalProductPrice = 0,
deliveryPrice = 0,
...
)
참고
Typescript / TSLint 오류 - Type boolean trivially inferred from a boolean literal, remove type annotation
Vue 컴포넌트를 만들고 있는데 TSLint에서 경고를 했다. 문제가 된 코드 private resizable: boolean = true;TSLint 경고 내용 Type boolean trivially inferred from a boolean literal, remove type annotation원인 초기값을 할당하
server0.tistory.com
Tslint - type trivially inferred - Why is it bad practice to include the type here?
In VSCode the linter , tslint, complains when I add the following code, with the type: serverId: number = 10; And gives the following message: [tslint] Type number trivially inferred from a nu...
stackoverflow.com
728x90
반응형