docs(core): fix types & improve jsdoc comments (#10620)

This commit is contained in:
Ammar Ahmed
2025-01-13 01:38:28 +05:00
committed by GitHub
parent 3dec0a5e99
commit 24ad6e45b1
55 changed files with 1057 additions and 39 deletions

View File

@ -11,25 +11,35 @@ import { CoreTypes } from '../../core-types';
import { Style } from '../styling/style';
/**
* Represents a tab view entry.
*
* @nsView TabViewItem
*/
export class TabViewItem extends ViewBase {
/**
* Gets or sets the title of the TabViewItem.
*
* @nsProperty
*/
public title: string;
/**
* Gets or sets the view of the TabViewItem.
*
* @nsProperty
*/
public view: View;
/**
* Gets or sets the icon source of the TabViewItem. This could either be a a file name or resource id.
*
* @nsProperty
*/
public iconSource: string;
/**
* Gets or sets the text transform of the tab titles.
*
* @nsProperty
*/
textTransform: CoreTypes.TextTransformType;
@ -56,40 +66,63 @@ export interface SelectedIndexChangedEventData extends EventData {
/**
* Represents a tab view.
*
* @nsView TabView
*/
export class TabView extends View {
/**
* String value used when hooking to the selectedIndexChanged event.
*
* @nsEvent {SelectedIndexChangedEventData} selectedIndexChanged
*/
public static selectedIndexChangedEvent: string;
/**
* Gets or sets the items of the TabView.
*
* @nsProperty
*/
items: Array<TabViewItem>;
/**
* Gets or sets the selectedIndex of the TabView.
*
* @nsProperty
*/
selectedIndex: number;
/**
* Gets or sets the font size of the tabs titles.
*
* @nsProperty
*/
tabTextFontSize: number;
/**
* Gets or sets the text color of the tabs titles.
*
* @nsProperty
*/
tabTextColor: Color;
/**
* Gets or sets the background color of the tabs.
*
* @nsProperty
*/
tabBackgroundColor: Color;
/**
* Gets or sets the text color of the selected tab title.
*
* @nsProperty
*/
selectedTabTextColor: Color;
/**
* Gets or sets the color of the horizontal line drawn below the currently selected tab on Android.
*
* @nsProperty
*/
androidSelectedTabHighlightColor: Color;
@ -109,6 +142,8 @@ export class TabView extends View {
* - automatic
* - alwaysOriginal
* - alwaysTemplate
*
* @nsProperty
*/
iosIconRenderingMode: 'automatic' | 'alwaysOriginal' | 'alwaysTemplate';
@ -117,12 +152,16 @@ export class TabView extends View {
* Valid values are:
* - alwaysOriginal
* - alwaysTemplate
*
* @nsProperty
*/
androidIconRenderingMode: 'alwaysOriginal' | 'alwaysTemplate';
/**
* Gets or sets the number of tabs that should be retained to either side of the current tab in the view hierarchy in an idle state.
* Tabs beyond this limit will be recreated from the TabView when needed.
*
* @nsProperty
*/
androidOffscreenTabLimit: number;
@ -131,19 +170,18 @@ export class TabView extends View {
* Valid values are:
* - top
* - bottom
*
* @nsProperty
*/
androidTabsPosition: 'top' | 'bottom';
/**
* Gets or sets a value indicating whether swipe gesture is enabled for Android.
*
* @nsProperty
*/
androidSwipeEnabled: boolean;
/**
* String value used when hooking to the selectedIndexChanged event.
*/
public static selectedIndexChangedEvent: string;
/**
* Adds a listener for the specified event name.
*