You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getTemplates() method is implemented in ServerClient class but its type definition is not properly exposed in the public TypeScript interface. This causes TypeScript errors when trying to use the method, requiring type assertions to work around the issue.
However, when using the package, TypeScript doesn't recognize this method on the ServerClient type.
Reproduction
import{ServerClient}from'postmark';constclient=newServerClient('API_KEY');// TypeScript error: Property 'getTemplates' does not exist on type 'ServerClient'consttemplates=awaitclient.getTemplates();
Expected Behavior
The getTemplates() method should be included in the public TypeScript interface for ServerClient, matching its implementation.
Current Workaround
consttemplates=await(clientasany).getTemplates();
Environment
postmark package version: 4.0.5
TypeScript version: 5.0.4
Node.js version: 24.1.0
Possible Fix
The type definition for getTemplates should be included in the public interface of ServerClient.
The text was updated successfully, but these errors were encountered:
Description
The
getTemplates()
method is implemented inServerClient
class but its type definition is not properly exposed in the public TypeScript interface. This causes TypeScript errors when trying to use the method, requiring type assertions to work around the issue.Implementation vs Types
The method is implemented here:
postmark.js/src/client/ServerClient.ts
Lines 236 to 245 in 62dfe1f
However, when using the package, TypeScript doesn't recognize this method on the
ServerClient
type.Reproduction
Expected Behavior
The
getTemplates()
method should be included in the public TypeScript interface forServerClient
, matching its implementation.Current Workaround
Environment
Possible Fix
The type definition for
getTemplates
should be included in the public interface ofServerClient
.The text was updated successfully, but these errors were encountered: