22
23declare global {
24 // eslint-disable-next-line no-unused-vars
25 namespace JSX {26 // eslint-disable-next-line no-unused-vars27 interface IntrinsicElements {28 "hanko-auth": HankoAuthElement;29 }30 }31}
32
33const HankoAuth = ({ api, lang = "en" }: Props) => {
Custom TypeScript modules (module foo {}
) and namespaces (namespace foo {}
) are considered outdated ways to organize TypeScript code. ES2015 module syntax is now preferred (import/export
).
This rule still allows the use of TypeScript module declarations to describe external APIs (declare module 'foo' {}
).
module foo {}
namespace foo {}
declare module foo {}
declare namespace foo {}
declare module 'foo' {}