mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #226 from NativeScript/TS-defs-
TypeScript definitions problems fixed
This commit is contained in:
@@ -250,13 +250,13 @@
|
|||||||
<TypeScriptCompile Include="image-source\image-source.d.ts" />
|
<TypeScriptCompile Include="image-source\image-source.d.ts" />
|
||||||
<TypeScriptCompile Include="js-libs\easysax\easysax.d.ts" />
|
<TypeScriptCompile Include="js-libs\easysax\easysax.d.ts" />
|
||||||
<TypeScriptCompile Include="location\location.d.ts" />
|
<TypeScriptCompile Include="location\location.d.ts" />
|
||||||
<TypeScriptCompile Include="location\location-common.ts" >
|
<TypeScriptCompile Include="location\location-common.ts">
|
||||||
<DependentUpon>location.d.ts</DependentUpon>
|
<DependentUpon>location.d.ts</DependentUpon>
|
||||||
</TypeScriptCompile>
|
</TypeScriptCompile>
|
||||||
<TypeScriptCompile Include="location\location.android.ts" >
|
<TypeScriptCompile Include="location\location.android.ts">
|
||||||
<DependentUpon>location.d.ts</DependentUpon>
|
<DependentUpon>location.d.ts</DependentUpon>
|
||||||
</TypeScriptCompile>
|
</TypeScriptCompile>
|
||||||
<TypeScriptCompile Include="location\location.ios.ts" >
|
<TypeScriptCompile Include="location\location.ios.ts">
|
||||||
<DependentUpon>location.d.ts</DependentUpon>
|
<DependentUpon>location.d.ts</DependentUpon>
|
||||||
</TypeScriptCompile>
|
</TypeScriptCompile>
|
||||||
<TypeScriptCompile Include="apps\tests\app\pageNavigation.ts" />
|
<TypeScriptCompile Include="apps\tests\app\pageNavigation.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.android.ts" />
|
||||||
<TypeScriptCompile Include="apps\TelerikNEXT\TelerikUI\side-bar\side-bar.d.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="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\css-selector.ts" />
|
||||||
|
<TypeScriptCompile Include="ui\styling\style-property.d.ts" />
|
||||||
<TypeScriptCompile Include="ui\styling\style.ts" />
|
<TypeScriptCompile Include="ui\styling\style.ts" />
|
||||||
<TypeScriptCompile Include="ui\styling\visual-state.ts" />
|
<TypeScriptCompile Include="ui\styling\visual-state.ts" />
|
||||||
<TypeScriptCompile Include="ui\core\view-common.ts">
|
<TypeScriptCompile Include="ui\core\view-common.ts">
|
||||||
@@ -1513,7 +1515,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</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>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
||||||
3
ui/core/bindable.d.ts
vendored
3
ui/core/bindable.d.ts
vendored
@@ -65,9 +65,10 @@
|
|||||||
*/
|
*/
|
||||||
unbind(property: string);
|
unbind(property: string);
|
||||||
|
|
||||||
|
_onBindingContextChanged(oldValue: any, newValue: any);
|
||||||
|
|
||||||
//@private
|
//@private
|
||||||
_updateTwoWayBinding(propertyName: string, value: any);
|
_updateTwoWayBinding(propertyName: string, value: any);
|
||||||
_onBindingContextChanged(oldValue: any, newValue: any);
|
|
||||||
//@endprivate
|
//@endprivate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
ui/core/dependency-observable.d.ts
vendored
1
ui/core/dependency-observable.d.ts
vendored
@@ -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.
|
* 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 {
|
export class DependencyObservable extends observable.Observable {
|
||||||
//@private
|
|
||||||
// TODO: Do we want to expose the get/setValue methods as public?
|
// TODO: Do we want to expose the get/setValue methods as public?
|
||||||
/**
|
/**
|
||||||
* Gets a value for the property.
|
* Gets a value for the property.
|
||||||
|
|||||||
5
ui/core/view.d.ts
vendored
5
ui/core/view.d.ts
vendored
@@ -368,6 +368,9 @@ declare module "ui/core/view" {
|
|||||||
onUnloaded(): void;
|
onUnloaded(): void;
|
||||||
isLoaded: boolean;
|
isLoaded: boolean;
|
||||||
|
|
||||||
|
_addView(view: View);
|
||||||
|
_removeView(view: View);
|
||||||
|
|
||||||
// TODO: Implement logic for stripping these lines out
|
// TODO: Implement logic for stripping these lines out
|
||||||
//@private
|
//@private
|
||||||
_domId: number;
|
_domId: number;
|
||||||
@@ -375,8 +378,6 @@ declare module "ui/core/view" {
|
|||||||
|
|
||||||
_isAddedToNativeVisualTree: boolean;
|
_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.
|
* 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
56
ui/styling/css-selector.d.ts
vendored
Normal 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
19
ui/styling/style-property.d.ts
vendored
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
5
ui/styling/styling.d.ts
vendored
5
ui/styling/styling.d.ts
vendored
@@ -1,7 +1,4 @@
|
|||||||
/**
|
declare module "ui/styling" {
|
||||||
*
|
|
||||||
*/
|
|
||||||
declare module "ui/styling" {
|
|
||||||
import observable = require("ui/core/dependency-observable");
|
import observable = require("ui/core/dependency-observable");
|
||||||
import color = require("color");
|
import color = require("color");
|
||||||
import view = require("ui/core/view");
|
import view = require("ui/core/view");
|
||||||
|
|||||||
Reference in New Issue
Block a user