thefrontside / simulacrum

A simulation platform for use during testing, during development and for high-fidelity application previews
88 stars 14 forks source link

improve typing in ldap simulator #194

Open dagda1 opened 2 years ago

dagda1 commented 2 years ago

There are too many any types in the ldap simulator (most of them were added by me).

We should improve the typing.

cowboyd commented 2 years ago

Seems like the biggest problem is that the upstream @types/ldapjs is riddled with any.... especially on the server callbacks https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ldapjs/index.d.ts#L315-L330

Maybe the best fix is there?

GitHub
DefinitelyTyped/index.d.ts at master · DefinitelyTyped/DefinitelyTyped
The repository for high quality TypeScript type definitions. - DefinitelyTyped/index.d.ts at master · DefinitelyTyped/DefinitelyTyped
dagda1 commented 2 years ago

@cowboyd the types are pretty terrible, I think we can make them better without too much trouble and maybe using declaration augmentation.