mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
// Microsoft Teams tests
|
|
// Project: https://github.com/OfficeDev/microsoft-teams-library-js
|
|
|
|
/**
|
|
* Sample code for TypeChecking
|
|
* [Not an example]
|
|
*/
|
|
(() => {
|
|
microsoftTeams.getContext(context => {
|
|
const { upn, channelId } = context;
|
|
context.isFullScreen = true;
|
|
});
|
|
|
|
microsoftTeams.settings.getSettings(settings => {
|
|
const { contentUrl, entityId } = settings;
|
|
});
|
|
|
|
microsoftTeams.initialize();
|
|
|
|
microsoftTeams.navigateCrossDomain('https://bing.com');
|
|
|
|
microsoftTeams.registerOnThemeChangeHandler(theme => {
|
|
microsoftTeams.shareDeepLink({
|
|
subEntityId: '',
|
|
subEntityLabel: theme,
|
|
subEntityWebUrl: ''
|
|
});
|
|
});
|
|
|
|
microsoftTeams.authentication.authenticate({
|
|
failureCallback: () => { },
|
|
height: 200,
|
|
width: 200,
|
|
url: '',
|
|
successCallback: done => { }
|
|
});
|
|
|
|
microsoftTeams.getTabInstances(tabInfo => {
|
|
const tabInstances: microsoftTeams.TabInstance[] = tabInfo.teamTabs;
|
|
});
|
|
|
|
microsoftTeams.getMruTabInstances(tabInfo => {
|
|
const tabInstances: microsoftTeams.TabInstance[] = tabInfo.teamTabs;
|
|
});
|
|
})();
|