Commit Graph

49 Commits

Author SHA1 Message Date
Jeff Fisher
6370ba5a78 Big update of WinJS definitions.
Went through and did a large number of fixes as part of converting the WinJS test tree to TypeScript.

Full list of changes:

Fix small issue with WinJS.Promise.timeout. (The first argument should be optional.)

Remove an unnecessary comment about winControl.

Fix WinJS Promise types

Make addEventListener and removeEventListener static.

markDisposable's second argument is optional.

WinJS.UI.Fragments.clearCache had a missing overload.

Add missing overload for WinJS.UI.Fragments.renderCopy.

WinJS.Class.define constructor parameter is optional.

Add override for WinJS.log

Message can also be a function that returns a string.

Also add override for WinJS.Utilities.startLog

All ILogOptions properties are optional.

Make WinJS.log arguments optional.

WinJS.Resources.processAll returns a Promise.

Add WinJS.Utilities.Scheduler.currentPriority

Make WinJS.Promise.wrap()'s argument optional.

Make IXHROptions data property optional.

Add CustomRequestInitializer to IXHROptions.

Correct doc comment for WinJS.Application.*.writeText

Fix declaration for static render on WinJS.Binding.Template.

Add WinJS.Utilities.getTabIndex.

Add overload for WinJS.Utilities.QueryCollection.include

Fix WinJS.Utilities.getRelativeTop and getRelativeLeft parameters.

Add getScrollPosition and setScrollPosition.

Make BindingList.createGrouped last argument optional.

Fix return type of WinJS.UI.computeDataSourceGroups()

Add missing static createResultSuggestionImage to WinJS.UI.SearchBox.

Add missing overload for WinJS.Binding.List.push()

Add generic overload for IItemPromise.then()

Fix the return value of IItemPromise.then to be correct.

Promise.dispatchEvent should be static.

Fix IItemPromise.retain return value.

Create IPromise interface.

This helps type coercion with custom promise types (such as IItemPromise).

Add missing animations to latest d.ts.

Update optional parameters on animations.

Add BindingList.unshift overload

Fix BindingList.sort() to have argument be optional.

Fix arguments for BindingList.splice and BindingList.join

Fix BindingList.lastIndexOf optional second argument.

Fix return time of items in GroupedSortedListProjections.

Make last argument of QueryCollection.template optional.

Fix WinJS.UI.Repeater constructor.

Fix the type of the second parameter of the WinJS.Binding.Template constructor

Update WinJS.UI.ListLayout so that it implements ILayout2.

Update WinJS.UI.GridLayout.

Add static Promise.cancel property.

Add type property to IListViewItem

Make argument to Promise.as optional.

Add AppBar.closedDisplayMode

Make some arguments optional on Flyout.show()

Make arguments optional on Menu.show();

Fix generic type of Hub.zoomableView.

Add missing Promise.then overloads.

Update author information

Fix IPageControlMembers to reflect the real contract.

TypeScript doesn't allow overrides to vary only by return type, so we have to use any as both void and returning a Promise are allowed.

WinJS.UI.Pages.render()'s second argument is optional.

WinJS.UI.Pages.render() returns a promise to the page itself.

Fix return values of WinJS.UI.Pages.get/define.

Add Pivot and PivotItem to latest d.ts.

Fix PivotItem.header type
2014-09-24 14:32:25 -07:00
Basarat Ali Syed
f25ceeddfd Merge pull request #2423 from jseanxu/legacy
Created separate definition files for release versions of WinJS
2014-07-11 22:28:46 +10:00
Sean Xu
2646c36929 Moved released versions into the root folder. 2014-07-07 12:51:19 -07:00
Sean Xu
4bc469d06c Missing semicolon. 2014-06-27 15:29:38 -07:00
Sean Xu
adcbed64b1 Renamed 'legacy' folder to 'releases'. 2014-06-27 15:22:21 -07:00
Sean Xu
57869e481c Created 2.1 definition file. Used 2.0 as a base and changes according to the API change doc ( http://msdn.microsoft.com/en-us/library/windows/apps/dn632432.aspx ) 2014-06-27 12:25:38 -07:00
Basarat Syed
6abe4d7cee chore(winjs) consistent formatting
4 spaces instead of tabs + TS/VS autoformat (trailing spaces + :<space><type> instead of :<type>)
2014-06-25 13:26:53 +10:00
craigktreasure
e62c50cf7b Added isPhone property from WinJS 2.1
Added WinJS 2.1 isPhone property to support WinJS 2.0 and WinJS 2.1 code
sharing in "Universal" Shared projects.

See http://msdn.microsoft.com/en-us/library/windows/apps/dn607959.aspx.
2014-06-23 20:26:48 -07:00
Sean Xu
f222ca2768 Created 2.0 definitions file. Fixed a few removals from 1.0. 2014-06-12 16:56:57 -07:00
Sean Xu
333341f111 Created legacy WinJS 1.0 definitions file. 2014-06-12 13:14:44 -07:00
Sean Xu
05215ffa2c Removed references and dependencies to winrt.d.ts. 2014-06-05 14:49:16 -07:00
Anand Prakash
375d64188a Updated IOHelper.writeText to return WinJS.Promise<number> instead of WinJS.Promise<void> 2014-05-05 19:02:45 -07:00
Anand Prakash
63ae54c867 Added constructor support for QueryCollection<T> interface 2014-04-27 18:38:43 -07:00
Anand Prakash
bfe38c6de7 Made element parameter optional in WinJS.Utilities.query as it is optional in WinJS implementation. See http://msdn.microsoft.com/en-us/library/windows/apps/br229847.aspx. 2014-04-27 17:35:19 -07:00
Anand Prakash
5051de332f Changed QueryCollection to be an interface instead of class so that it can extend Array interface. In WinJS implementaion, QueryCollection extends Array and all Array members should be available on QueryCollection. 2014-04-27 17:33:12 -07:00
Anand Prakash
1d55f70e34 Fixed local, roaming and temp definitions on WinJS.Application object. These should be instances on IOHelper as defined in WinJS. 2014-04-27 17:29:43 -07:00
jseanxu
55c1ee5cd1 As the doc says, the type of the first parameter is the VALUE (not the promise itself) to be returned by the return promise. 2014-04-09 15:22:55 -07:00
jseanxu
27b4741d5c Missing property in the WinJS.Utilities namespace. 2014-04-09 15:22:08 -07:00
jseanxu
f3b8cfb7e3 Fixed some typing in WinJS.Utilities. 2014-04-09 15:21:51 -07:00
jseanxu
a85238496d Parameterized some utility functions. This assures that the return type and the input type are always the same. 2014-04-09 15:21:07 -07:00
jseanxu
40c621ae5c As the docs indicate, the 2nd parameter is optional. 2014-04-09 15:19:51 -07:00
jseanxu
722788bcc7 This guy can be even more specialized - it takes only img tags. 2014-04-09 15:19:33 -07:00
jseanxu
793e49acba Provided an interface for the currentItem property. Fixed up some minor typing and visibility issues in ListView. 2014-04-09 15:19:02 -07:00
jseanxu
b69147f2a5 Fixed some any-typed properties. 2014-04-09 15:17:52 -07:00
jseanxu
dcff230b75 The 'calendar' property is a format string. 2014-04-09 15:16:22 -07:00
jseanxu
fac68f1264 As the docs say, these 2 properties are HTMLElements. 2014-04-09 15:14:27 -07:00
jseanxu
c4cfea06a6 The 'commands' property of both AppBar and Menu can take both a single command or an array of commands. Since there is no syntax to type this duality, we should indicate an array of commands instead. 2014-04-09 15:13:47 -07:00
jseanxu
0a7bf0d889 The second parameter for show/hideCommands for AppBar can be optional, especially since it is deprecated, it is actually encouraged to not specify it. 2014-04-09 15:12:08 -07:00
jseanxu
2de7bfe627 WinJS control constructors do not require an element to be passed. If no element is passed, an element is created during construction and accessible via the 'element' property. 2014-04-09 15:10:08 -07:00
basarat
82fcdaf511 winjs - winrt updates Merge branch 'master' of https://github.com/craigktreasure/DefinitelyTyped into winjs-updates 2014-01-26 11:16:12 +11:00
craigktreasure
4b18584819 WinJS.Binding updates from Adam
Updated WinRt from @adamhewitt627 as well as his changes for
WinJS.Binding.
2014-01-24 20:54:12 -08:00
Bart van der Schoor
5263434c20 added/fixed few headers
https://github.com/borisyankov/DefinitelyTyped/issues/1570

cleaned up some more, mostly urls and typos
2014-01-25 01:08:33 +01:00
Bartvds
d436daf4c2 added/fixed headers t-z
https://github.com/borisyankov/DefinitelyTyped/issues/1570
2014-01-24 02:59:02 +01:00
craigktreasure
bde65f741d Fixed the Page object.
Generated pages don't play nicely with the optional options parameter.
Made it required.
2014-01-22 21:19:08 -08:00
craigktreasure
c47a3ad39c Lots of small updates
Object -> any
Other small corrections
2014-01-22 21:01:34 -08:00
craigktreasure
d182a6e43d WinJS file heading
Re-added license and WinRT reference.
2014-01-20 17:50:27 -08:00
craigktreasure
7f91e75893 Full WinJS and WinRT update
This contains a complete WinJS type definition with required WinRT type
definition update.
2014-01-20 17:46:56 -08:00
vvakame
24cc356d6f Remove not required tscparams 2014-01-11 22:55:11 +09:00
Adam Hewitt
1f2d03f0ef fix missing file reference 2014-01-10 14:54:37 -08:00
Adam Hewitt
556523ad40 work so it will still compile if implicit any is turned off 2014-01-04 12:51:36 -08:00
Adam Hewitt
b0d6f6912e work to extend the definitions for WinJS and WinRT 2014-01-04 11:56:15 -08: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
Aaron
dbcb92dc96 Update win.js to include the Template class 2013-10-02 11:25:04 -05:00
Aaron
856043d464 Added WinJS.Binding.Template class
I did not add the unusual function `render.value(...)` as I didn't know how to represent that cleanly in TypeScript.
2013-10-02 08:41:56 -05:00
Aaron
8c8629ffb7 Update winjs.d.ts to include a large number of missing functions from the List class. 2013-09-23 13:16:09 -05:00
Aaron
c407adfd5e Update winjs.d.ts to include proper signature for createGrouped function
createGrouped was missing a required parameter.
2013-09-20 17:10:50 -05:00
Aaron
e26d31d81d Update winjs.d.ts to include the class ErrorFromName
From http://msdn.microsoft.com/en-us/library/windows/apps/br211689.aspx#methods, the class ErrorFromName was missing.
2013-08-30 15:37:28 -05:00
basarat
e41aa1f64d winjs/winrt from TypeScript samples 2013-08-28 21:50:03 +10:00