teamleadercrm / sdk-js

MIT License
6 stars 0 forks source link

Typescript #329

Closed lowiebenoot closed 2 years ago

lowiebenoot commented 2 years ago

Implemented typescript into the codebase. The endpoints itself are not typed, but you can pass an optional type yourself.

interace CompanyInfo {
  id: string;
  name: string;
}

const api = API({ getAccessToken });
const result = api.companies.info<CompanyInfo>({ id: 'foobar' });