import {Tab, Composite, WidgetCollection, Button} from 'tabris'; let widget: Tab = new Tab(); widget.appendTo(new Composite()); widget.insertBefore(new Composite()); widget.insertAfter(new Composite()); /*Expected (4, not assignable to parameter (5, not assignable to parameter (6, not assignable to parameter */
function test_Tab() { var tab: Tab = new Tab(); tab.set("foo", 23); tab.set({ badge: "foo", title: "bar", image: {src: "http://example.org"} }); var folder = new TabFolder(); tab.appendTo(folder); }
import {ColorValue, ImageValue, Properties, Tab, TabFolder, WidgetCollection} from 'tabris'; let widget: Tab = new Tab(); // Properties let badge: number; let image: ImageValue; let selectedImage: ImageValue; let title: string; let nullValue: null; let badgeColor: ColorValue; badge = widget.badge; image = widget.image as ImageValue; nullValue = widget.image as null; selectedImage = widget.selectedImage as ImageValue; nullValue = widget.selectedImage as null; title = widget.title; badgeColor = widget.badgeColor; widget.badge = badge; widget.image = image; widget.image = nullValue; widget.selectedImage = selectedImage; widget.selectedImage = nullValue; widget.title = title; widget.badgeColor = badgeColor; let properties: Properties<Tab> = {badge, image, selectedImage, title, badgeColor}; widget = new Tab(properties); widget.set(properties);