Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Backbone to external module #56

Closed
wants to merge 1 commit into from

4 participants

@ryan-nauman

See my original issue: #12

And this which broke it again: #27

I'm not sure what @k33g is going for. Please continue the discussion in this thread instead of either of those.

@docgit

I don't get the point in declaring it as an external module. If you use

declare module Backbone

you do not have to import the module. Just use it.

@ryan-nauman

If you are generating modules with AMD you have to import it so that the define() wrapper is generated correctly.

@borisyankov
Owner

TypeScript team seems to suggest that modules (like node ones) that are usually imported are to be external.
And the rest to be simply internal. It definitely is making things more weird/complicated by declaring them external.
Is there a way to have it both ways? And possibly ask the TS team to clarify the intent behind the two usages?

@ryan-nauman

I've created a discussion on codeplex and will update here as that thread changes. If anyone else has a point to add please do so here or there. I really don't want to have to maintain a fork because of 1 line but if I'm in the minority here I will.

http://typescript.codeplex.com/discussions/402301

@seanhess

+1 on this issue. It's really annoying to use AMD with the modules in this repo.

@docgit

Thank you @ryan-naumann. I like your post on codeplex and hope this will help clarifying this issue.

@seanhess

See http://typescript.codeplex.com/workitem/388 - a proposal we added that would solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 7, 2012
  1. @ryan-nauman

    back to external module

    ryan-nauman authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Definitions/backbone-0.9.d.ts
View
2  Definitions/backbone-0.9.d.ts
@@ -1,7 +1,7 @@
// Type definitions for Backbone 0.9
// https://github.com/borisyankov/DefinitelyTyped
-declare module Backbone {
+declare module "Backbone" {
export class Events {
on(events: string, callback: (event) => any, context?: any): any;
Something went wrong with that request. Please try again.