All Projects β†’ mnn β†’ typings-sanctuary

mnn / typings-sanctuary

Licence: other
*UNMAINTAINED* type definitions (for TypeScript) for JavaScript library Sanctuary

Programming Languages

typescript
32286 projects
haskell
3896 projects
shell
77523 projects

Projects that are alternatives of or similar to typings-sanctuary

discord-api-types
Up to date Discord API Typings, versioned by the API version
Stars: ✭ 270 (+2150%)
Mutual labels:  typings
Sanctuary
πŸ™ˆ Refuge from unsafe JavaScript
Stars: ✭ 2,841 (+23575%)
Mutual labels:  sanctuary
discord.d.ts
Typings for the Discord gateway.
Stars: ✭ 24 (+100%)
Mutual labels:  typings
react-dts-generator
Typescript definitions for React components.
Stars: ✭ 18 (+50%)
Mutual labels:  typings
sanctuary-identity
🌈 Fantasy Land -compliant Identity type
Stars: ✭ 24 (+100%)
Mutual labels:  sanctuary
FixLanguageTypeJs
Tiny Library for fix problem of language selection in type text.
Stars: ✭ 15 (+25%)
Mutual labels:  typings
tadd
πŸ“Ί Installs packages and automatically finds best Typescript typings
Stars: ✭ 20 (+66.67%)
Mutual labels:  typings
DiscordBot-Template
A boilerplate / template for discord.js bots with 100% coverage of Discord API, command handler, error handler based on https://discordjs.guide/
Stars: ✭ 129 (+975%)
Mutual labels:  typings
sanctuary-either
🌈 Fantasy Land -compliant Either type
Stars: ✭ 44 (+266.67%)
Mutual labels:  sanctuary
mxgraph-road-to-DefinitelyTyped
Community effort followup to provide mxgraph TypeScript type definitions / typings via DefinitelyTyped
Stars: ✭ 23 (+91.67%)
Mutual labels:  typings
liftr-tscov
Check the type coverage of any TypeScript project with this easy npm package
Stars: ✭ 28 (+133.33%)
Mutual labels:  typings
Definitelytyped
The repository for high quality TypeScript type definitions.
Stars: ✭ 37,066 (+308783.33%)
Mutual labels:  typings
tiny-typed-emitter
Fully type-checked NodeJS EventEmitter
Stars: ✭ 96 (+700%)
Mutual labels:  typings
types
TypeScript Type Definitions same as DefinitelyTyped.
Stars: ✭ 31 (+158.33%)
Mutual labels:  typings
opc-types
OpenComputers and TypeScript
Stars: ✭ 18 (+50%)
Mutual labels:  typings
dts-css-modules-loader
A small Webpack loader to generate typings for your CSS-Modules
Stars: ✭ 44 (+266.67%)
Mutual labels:  typings
Fluture
πŸ¦‹ Fantasy Land compliant (monadic) alternative to Promises
Stars: ✭ 2,249 (+18641.67%)
Mutual labels:  sanctuary
webgpu-seed
πŸ”ΊπŸŒ± An example on how to render a hello triangle with WebGPU.
Stars: ✭ 178 (+1383.33%)
Mutual labels:  typings
android-dts-generator
A tool that generates TypeScript declaration files (.d.ts) from Jars
Stars: ✭ 71 (+491.67%)
Mutual labels:  typings
sanctuary-maybe
🌈 Fantasy Land -compliant Maybe type
Stars: ✭ 95 (+691.67%)
Mutual labels:  sanctuary

Type definitions for Sanctuary (page, GitHub)

Just a reminder before using - do not expect 100% typings which are in my opinion impossible, because TypeScript's type (and module) system isn't just strong enough for all magic used in Sanctuary.

There are some nasty anys (sometimes masked behind empty interface or non-parameter generic) and on some places you have to help TS with types inferring (e.g. S.Nothing<number>()). If you can think of better solution than is in this typings, please consider making a PR.

Status

Almost everything is typed. Consider this project to be a beta version, there may be breaking changes (I will try to not break anything).

Installation

Fast

For now just a hacky solution. (Typings tool with GitHub address can't be used, because it doesn't support multiple files - it breaks typings for Maybe and other types.)

Run this in your project directory (it creates typings module directory in node_modules and downloads typings):

wget -qO- https://github.com/mnn/typings-sanctuary/raw/master/install.sh | bash -s

Local package

If you want a bit better solution you can try local package approach.

Create directory local_packages/typings-sanctuary in your project and download typings into that directory (typings are files in the directory sanctuary at this repo).

Create there package.json:

{
  "name": "@types/sanctuary",
  "version": "0.0.1",
  "author": "monnef"
}

Add it to your project's dependencies:

  "dependencies": {
    "@types/sanctuary": "./local_packages/typings-sanctuary"
   }

Run npm install and you should be all set.

Usage

After installation you should be able to compile and run following code (IntelliJ IDEA friendly version):

import SanctuaryMod = require('sanctuary/index');

const S = SanctuaryMod.create({checkTypes: false, env: SanctuaryMod.env});

console.log(S.add(1, 2));

Testing

To compile and execute sanctuary-tests.ts run (assuming npm install has been done):

npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].