Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish typings to https://github.com/typings/registry #57

Open
gerich-home opened this issue Mar 31, 2016 · 0 comments
Open

Publish typings to https://github.com/typings/registry #57

gerich-home opened this issue Mar 31, 2016 · 0 comments

Comments

@gerich-home
Copy link
Owner

Typings are generated during the build now.
We need to publish them to the https://github.com/typings/registry so that it will be possible to run typings install it-depends, then edit your tsconfig.json in the following way:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "noImplicitAny": false,
        "sourceMap": false
    },
    "files": [
        "index.ts",
        "typings/main.d.ts"
    ]
}

and get compile error

index.ts(6,36): error TS2345: Argument of type '() => number' is not assignable to parameter of type 'ICalculator<string>'.
  Type 'number' is not assignable to type 'string'.

when running tsc for the following index.ts file:

import * as itDepends from 'it-depends'

var x = itDepends.value<number>(1);
x.onChange(()=>x.write(2));

var y = itDepends.computed<string>(()=>{
    return x();
});

I tried to install typings from local filesystem and they work great!
Just run smth like typings install it-depends=file:..\it-depends\out\definitions\it-depends.d.ts --save and it will generate typing file similar to this: https://gist.github.com/gerich-home/c23f5c81c1d5bd0c39df6cba5d68029c

We just need to automate it for release process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant