-
Notifications
You must be signed in to change notification settings - Fork 261
typings search domready returns 1 result only #129
Comments
In terms of indexing, this is a bug in the API (https://github.com/typings/api). Problem is, DefinitelyTyped is a little inconsistent so I expected my parsing to fail in one or two places. Still, it's a good issue to be aware of. To install arbitrary To convert to non-ambient, just create a repo (such as declare function domready(callback: () => any): void;
export = domready; Once it's in the registry, it'll be linked forever (or until GitHub is down) 👍 Personally, I would love if you want to get it on the registry, so if you do get stuck, let me know. |
Thanks. Working on it right now. Should I do I write in typescript and currently d.ts files in Reference some of the discussions: |
@unional Please use |
@unional You need to use |
Maybe I should not include |
Oh, regarding |
@unional It will not be recognised as an external module until you install it with Typings. You can install it if you need to test locally - E.g. You should definitely include On |
Ah, I understand what you mean. running // Compiled using typings@0.6.2
// Source: typings\domready.d.ts
declare module 'domready' {
function domready(callback: () => any) : void;
export = domready;
} I'm been learning about typescript + jspm/systemjs + tsd for a while. It is a complicated issue and I will create a repo to showcase it. I'm using jspm with Referencing some of the related discussions: |
When I try to config the system to build with Seems like it is related to this: Should |
Here is the same issue I'm see above: |
Thanks for all the links BTW, I'll try to come back to this once I get the chance. I do feel like this is something the compiler should fix, but I'm happy to "polyfill" various features when required before they land upstream. |
Thanks! I'm working on the sample repo for this and help me to clear my head. IMO some collaborations are needed to "level the playground". |
In terms of code contribution, probably. A good place where I can add collaborators however is everything else - merging into the registry, supporting type definitions, documentation (big one). |
Also, on those issues you linked, that's pretty much the gist. There's no ES6 equivalent to |
You mentioned "they are ES5 CommonJS" above, why am I still able to write the d.ts in ES6 syntax such as: import a from 'abc';
export * from 'abc'; Do you mean that d.ts support all syntax in TypeScript unless they can't be transpiled to ES5 CommonJS? IMO the core usage of d.ts is to provide better IDE support (and maybe some tsc compile time check). In that sense, I don't see why it should be limited to ES5 CommonJS compatibility. Or maybe introduce something that indicates who is the consumer (such as browser and using jspm or webpack), or the comsuming target? Obviously the IDE is working fine with |
@blakeembrey , the demo is ready. |
Since the original issue is fixed, I'll close this issue and open another one for the current discussion |
@unional Finally got around to trying your example, it worked with TS 1.8. |
Yeah, it's nice. 👍 |
I'm using
ded/domready
so the dt file installed is not what I want (requirejs-domready
module name isdomReady
, whileded/domready
module name isdomready
).How do I get
ded/domeready
d.ts, or how can I help to add it to the non-ambient version (better)?I'm trying to follow the steps to create the type definition. But since there is a duplicate in this case, what should I do?
The text was updated successfully, but these errors were encountered: