Don't expose platform types in public d.ts files.

Use any. Add a comment with the real type.
This commit is contained in:
Hristo Deshev
2015-10-30 17:01:15 +02:00
parent c84227dc4d
commit 70041bd999
33 changed files with 141 additions and 147 deletions

View File

@@ -9,6 +9,6 @@
* @param control An instance of the UIControl which state will be watched.
* @param callback A callback called when a visual state of the UIControl is changed.
*/
constructor(control: UIControl, callback: (state: string) => void);
constructor(control: any /* UIControl */, callback: (state: string) => void);
}
}
}

View File

@@ -62,18 +62,6 @@ function onIsUserInteractionEnabledPropertyChanged(data: dependencyObservable.Pr
}
(<proxy.PropertyMetadata>viewCommon.View.isUserInteractionEnabledProperty.metadata).onSetNativeValue = onIsUserInteractionEnabledPropertyChanged;
export var NativeViewGroup = (<any>android.view.ViewGroup).extend({
onMeasure: function (widthMeasureSpec, heightMeasureSpec) {
var owner: viewDefinition.View = this[OWNER];
owner.onMeasure(widthMeasureSpec, heightMeasureSpec);
this.setMeasuredDimension(owner.getMeasuredWidth(), owner.getMeasuredHeight());
},
onLayout: function (changed: boolean, left: number, top: number, right: number, bottom: number): void {
var owner: viewDefinition.View = this[OWNER];
owner.onLayout(left, top, right, bottom);
}
});
export class View extends viewCommon.View {
private _disableUserInteractionListener: android.view.View.OnTouchListener = new android.view.View.OnTouchListener({
onTouch: function (view: android.view.View, event: android.view.MotionEvent) {

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

@@ -452,7 +452,7 @@ declare module "ui/core/view" {
_propagateInheritableProperties(view: View)
_inheritProperties(parentView: View)
_removeView(view: View);
_context: android.content.Context;
_context: any /* android.content.Context */;
public _applyXmlAttribute(attribute: string, value: any): boolean;
@@ -474,7 +474,7 @@ declare module "ui/core/view" {
_eachChildView(callback: (child: View) => boolean);
_childrenCount: number;
_onAttached(context: android.content.Context): void;
_onAttached(context: any /* android.content.Context */): void;
_onContextChanged(): void;
_onDetached(force?: boolean): void;
_createUI(): void;
@@ -511,13 +511,6 @@ declare module "ui/core/view" {
export class CustomLayoutView extends View {
}
//@private
export class NativeViewGroup extends android.view.ViewGroup {
constructor(context: android.content.Context);
public setOwner(view: View);
}
//@endprivate
/**
* Defines an interface for adding arrays declared in xml.
*/