Giter VIP home page Giter VIP logo

slate-dts's Introduction

Generated TypeScript definition files for Slate

Typings

see ./packages for the type definition files.

Building

Run the generation script

sh ./scripts/generate.sh

slate-dts's People

Contributors

bsouthga avatar

Stargazers

Leonard Bogdonoff avatar Arunan avatar Andy Fang avatar Zz. avatar Alexey Elizarov avatar cybai (Haku) avatar azu avatar Jens Neuse avatar Svetlin Ralchev avatar

Watchers

Ted Halmrast avatar James Cloos avatar Christian Yang avatar  avatar

slate-dts's Issues

Update with latest version of slate

I'm not sure if there was a major API change in slate recently but it appears these type definitions don't have declarations for the Value which is one of the core objects. The repo says last update was 2 months ago so I thought perhaps it's just out of date.

Example:

import { Value } from 'slate'

Module ''slate'' has no exported member 'Value'.

And from looking at the .d.ts file I don't see it either although Document, Range, etc are there.

It seems like this was created as unofficial support as I found it from here:
ianstormtaylor/slate#560

But if it's an easy thing to re-run a script and get new types it might be worth it.

Error while running the generation

Hi there,
first of all thank you very much for your project and all the work :)

I've cloned the project and run: npm install and afterward npm run build. I will get the following errors (there are more for each project):

> [email protected] build /Users/jan/Projects/slate-dts
> sh ./scripts/generate.sh

cloning latest version of slate...
generating typings for slate-auto-replace...
cp: ./.tmp/slate-auto-replace/dist-dts/: No such file or directory
./scripts/generate.sh: line 58: ./packages/slate-auto-replace/package.json: No such file or directory
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: main does not exist: /Users/jan/Projects/slate-dts/packages/slate-auto-replace/index.d.ts
    at Object.bundle (/Users/jan/Projects/slate-dts/node_modules/dts-bundle/lib/index.js:79:9)
    at Object.<anonymous> (/Users/jan/Projects/slate-dts/scripts/dts-bundle.js:4:5)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open './packages/slate-auto-replace/slate-auto-replace.d.ts'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (/Users/jan/Projects/slate-dts/scripts/definition-modifications.js:6:15)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
...done!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.