- Ao criar uma interface estou recebendo a mensagem de erro abaixo:
Module parse failed: The keyword 'interface' is reserved (5:0)
File was processed with these loaders:
* ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
- Veja o código:
import React, { useRef } from 'react';
interface IProps {
accessKey?: string,
children?: React.ReactNode,
enter?: boolean,
escape?: boolean,
title?: string
}
function CustomButton({
accessKey,
children,
enter,
escape,
title }: IProps
) {
(...)
}