Merge pull request #226 from NativeScript/TS-defs-

TypeScript definitions problems fixed
This commit is contained in:
Vladimir Enchev
2015-03-26 11:53:58 +02:00
7 changed files with 93 additions and 18 deletions

View File

@@ -250,15 +250,15 @@
<TypeScriptCompile Include="image-source\image-source.d.ts" />
<TypeScriptCompile Include="js-libs\easysax\easysax.d.ts" />
<TypeScriptCompile Include="location\location.d.ts" />
<TypeScriptCompile Include="location\location-common.ts" >
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="location\location.android.ts" >
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="location\location.ios.ts" >
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="location\location-common.ts">
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="location\location.android.ts">
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="location\location.ios.ts">
<DependentUpon>location.d.ts</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="apps\tests\app\pageNavigation.ts" />
<TypeScriptCompile Include="apps\tests\pages\navigation\pageA-new-activity.ts" />
<TypeScriptCompile Include="apps\tests\pages\navigation\pageA.ts" />
@@ -394,7 +394,9 @@
<TypeScriptCompile Include="apps\TelerikNEXT\TelerikUI\side-bar\side-bar.android.ts" />
<TypeScriptCompile Include="apps\TelerikNEXT\TelerikUI\side-bar\side-bar.d.ts" />
<TypeScriptCompile Include="apps\TelerikNEXT\TelerikUI\side-bar\side-bar.ios.ts" />
<TypeScriptCompile Include="ui\styling\css-selector.d.ts" />
<TypeScriptCompile Include="ui\styling\css-selector.ts" />
<TypeScriptCompile Include="ui\styling\style-property.d.ts" />
<TypeScriptCompile Include="ui\styling\style.ts" />
<TypeScriptCompile Include="ui\styling\visual-state.ts" />
<TypeScriptCompile Include="ui\core\view-common.ts">
@@ -1513,7 +1515,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" />
<UserProperties ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -65,9 +65,10 @@
*/
unbind(property: string);
_onBindingContextChanged(oldValue: any, newValue: any);
//@private
_updateTwoWayBinding(propertyName: string, value: any);
_onBindingContextChanged(oldValue: any, newValue: any);
//@endprivate
}
}

View File

@@ -181,7 +181,6 @@ declare module "ui/core/dependency-observable" {
* This routine allows for various value modifiers per Property, which is used for inheritance, data-binding and styling purposes.
*/
export class DependencyObservable extends observable.Observable {
//@private
// TODO: Do we want to expose the get/setValue methods as public?
/**
* Gets a value for the property.

5
ui/core/view.d.ts vendored
View File

@@ -368,6 +368,9 @@ declare module "ui/core/view" {
onUnloaded(): void;
isLoaded: boolean;
_addView(view: View);
_removeView(view: View);
// TODO: Implement logic for stripping these lines out
//@private
_domId: number;
@@ -375,8 +378,6 @@ declare module "ui/core/view" {
_isAddedToNativeVisualTree: boolean;
_addView(view: View);
_removeView(view: View);
/**
* Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
*/

56
ui/styling/css-selector.d.ts vendored Normal file
View File

@@ -0,0 +1,56 @@
declare module "ui/styling/css-selector" {
import view = require("ui/core/view");
import cssParser = require("js-libs/reworkcss");
import styleProperty = require("ui/styling/style-property");
export class CssSelector {
constructor(expression: string, declarations: cssParser.Declaration[]);
expression: string;
declarations(): Array<{ property: string; value: any }>;
specificity: number;
matches(view: view.View): boolean;
apply(view: view.View);
eachSetter(callback: (property: styleProperty.Property, resolvedValue: any) => void);
}
class CssTypeSelector extends CssSelector {
specificity: number;
matches(view: view.View): boolean;
}
class CssIdSelector extends CssSelector {
specificity: number;
matches(view: view.View): boolean;
}
class CssClassSelector extends CssSelector {
specificity: number;
matches(view: view.View): boolean;
}
export class CssVisualStateSelector extends CssSelector {
specificity: number;
key: string;
state: string;
constructor(expression: string, declarations: cssParser.Declaration[]);
matches(view: view.View): boolean;
}
export function createSelector(expression: string, declarations: cssParser.Declaration[]): CssSelector;
class InlineStyleSelector extends CssSelector {
constructor(declarations: cssParser.Declaration[]);
apply(view: view.View);
}
export function applyInlineSyle(view: view.View, declarations: cssParser.Declaration[]);
}

19
ui/styling/style-property.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
declare module "ui/styling/style-property" {
import definition = require("ui/styling");
import observable = require("ui/core/dependency-observable");
export function getPropertyByName(name: string): Property;
export function getPropertyByCssName(name: string): Property;
export function eachProperty(callback: (property: Property) => void);
export function eachInheritableProperty(callback: (property: Property) => void);
export class Property extends observable.Property implements definition.Property {
constructor(name: string, cssName: string, metadata: observable.PropertyMetadata, valueConverter?: (value: any) => any);
cssName: string;
}
}

View File

@@ -1,7 +1,4 @@
/**
*
*/
declare module "ui/styling" {
declare module "ui/styling" {
import observable = require("ui/core/dependency-observable");
import color = require("color");
import view = require("ui/core/view");