JSFiddle - React, Tailwind, and code Playground
by Arnaud Buchholz
TypeScript
namespace apiv1 {
interface IConfig {
getConfig(): any
}
interface ICurrency {
getCurrency(): string
}
}
namespace apiv2 {
interface IConfig {
getConfig(): any
}
interface ICurrency {
getCurrency(): string
}
}
class ConfigImplv1 implements apiv1.IConfig {
getConfig(): string {
return 'EUR'
}
}
class ConfigImplv2 implements apiv2.IConfig {
getConfig(): string {
return 'EUR'
}
}
class CurrencyImpl implements apiv1.ICurrency, apiv2.ICurrency {
getCurrency(): string {
return 'EUR'
}
}
const configImpl = new CurrencyImpl();
console.log(configImpl.getCurrency());