Closed metonym closed 8 months ago
There's a subtle but important difference between export const and export declare const when used in a type definition file.
export const
export declare const
declare should be used in this case, since it's a type definition file; the variable is exported elsewhere.
declare
There's a subtle but important difference between
export const
andexport declare const
when used in a type definition file.export const
both declares and exports a constant.export declare const
signifies types for a variable that is created elsewhere.declare
should be used in this case, since it's a type definition file; the variable is exported elsewhere.