I am trying to learn typescript but i am not clear on few concepts on typescript such as:
1) I am but not the part Object = Object.assign
export const htmlElementsMap: Object = Object.assign(
{},
homePageElementsMap,
loginPageElementsMap,
productDetailPageElementsMap,
productListPageElementsMap,
shoppingBagPageElementsMap,
thankYouPageElementsMap
);
2) Same with this part export const UrlNavigationMap: Object = {
What is an object?
3) For this function i am not sure what does this PromiseLike<void>
means:
performAs(actor: PerformsTasks): PromiseLike<void> {
return actor.attemptsTo(
Click.on(homePageElementsMap.lnk_men),
SearchItemBySku.called()
);
}
4) export class FillShippingAddress implements Task {}
- What does implements means?
and last:
5) What is a static
and why it is assigned to the class name?
export class AddItemsToShoppingBag implements Task{
static called(gender: string): AddItemsToShoppingBag {
return new AddItemsToShoppingBag(gender);
}