Commit Graph

17 Commits

Author SHA1 Message Date
Bart van der Schoor
1d345f6c14 cleaned-up headers 2014-06-18 23:31:11 +02:00
Masahiro Wakame
dbc68718e1 Remove not required .tscparams 2013-11-29 15:25:31 +09:00
Václav Oborník
1de38a7ac8 spin.js - added missed types for --noImplicitAny typescript compilation 2013-11-23 21:52:50 +01:00
vvakame
2708bc05cd Fixed tsc failed on Node.js v0.8.25 2013-10-03 11:23:38 +09:00
vvakame
3fe1f6bc4e Fixed to CI test passing 2013-10-03 10:18:58 +09:00
Georgios Diamantopoulos
b8865fa537 Update spin.d.ts
`spin()` expects an HTMLElement, `JQuery` type won't work for example.
2013-09-08 15:00:07 +03:00
Theodore Brown
e3f3a34bd7 Expanded spin.js tests to cover each option 2013-08-23 12:25:04 -05:00
Theodore Brown
6d947d909b Normalized spin.js defninition line endings 2013-08-23 12:24:44 -05:00
Theodore Brown
15c1672d82 Updated spin.js definition for v1.3.1 of the library 2013-08-23 12:24:26 -05:00
Theodore Brown
7018a1beb6 Added el property, return types, and documentation 2013-08-11 22:48:01 -05:00
Theodore Brown
4c5af1c3fa bool -> boolean in spin.js 2013-07-21 11:28:25 -05:00
Theodore Brown
0c5b65ea0b Updated spin.js definition to match v1.3 2013-05-17 12:04:01 -05:00
Boris Yankov
209d95071a Update reference paths 2013-01-17 20:03:30 +02:00
Boris Yankov
c98eebb137 Rename all definition files, remove versions 2013-01-17 17:17:27 +02:00
James Manning
ae4e55ab1a Need to 'declare' the Spinner class
In TypeScript 0.8.1.1, a 'declare' is needed in front of the 'class Spinner', since without it the compiler attempts to compile it as an actual class definition, and fails with:

Message: Overload declaration lacks definition
Line number: 27
Column number: 5
Source error: 
Line 26: class Spinner {
Line 27:     constructor (options?: SpinnerOptions);
-------------^
Line 28:     spin(target?: any);

The test in the typescript codebase that confirms this is intentional behavior is in tests/compiler/class.ts

http://typescript.codeplex.com/SourceControl/changeset/view/2bee84410e02#tests/compiler/class.ts

****
describe('Testing function signatures inside classes', function () {
   it('Regression test - was previously giving runtime error', function () {
       var code = "class A { a(completed: () => any): void; }";
       Harness.Compiler.compileString(code, 'fnsig-inside-classes', function (result) {
           assert.compilerWarning(result, 1, 10, 'Overload declaration lacks definition');
           assert.equal(result.errors.length, 1);
       });
   });
});
****

The compiler code that implements the check is in src/compiler/signatures.ts

http://typescript.codeplex.com/SourceControl/changeset/view/2bee84410e02#src/compiler/signatures.ts

****
if (!hasConstruct && !this.definitionSignature && this.signatures[i].declAST && this.signatures[i].declAST.isOverload && !hasFlag(this.signatures[i].declAST.fncFlags, FncFlags.Ambient)) {
    checker.errorReporter.simpleError(this.signatures[i].declAST, "Overload declaration lacks definition");
}
****

By adding the 'declare', we tell the TypeScript compiler that this is just intending to expose the API of the class, not the actual implementation.
2012-12-20 11:02:45 -05:00
Boris Yankov
7c82efb17a Update reference paths 2012-11-19 01:28:08 +02:00
Boris Yankov
c91c45f9ae Move definitions and test in separate folders
This enables each definition to have a readme if necessary.
Also a .json metadata file to help with package managers.
And last, to have different versions of the definitions.
2012-11-18 22:28:44 +02:00