JavaScript does not support interfaces. See for more information: Does JavaScript have the interface type (such as Java's 'interface')?
You can use TypeScript, which does support interfaces: https://www.typescriptlang.org/docs/handbook/interfaces.html