本文整理匯總了TypeScript中xstream.of函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript of函數的具體用法?TypeScript of怎麽用?TypeScript of使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了of函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: stringDriver
function stringDriver(sink: Stream<string>) {
return xs.of('b');
}
示例2: driver
function driver(sink: Stream<string>) {
return xs.of('b').debug(spy);
}
示例3: main
function main(sources: {history: Stream<Location>}) {
return {
history: xs.of({type: 'replace', pathname: '/test'}),
};
}
示例4:
.map(x => (x === 1 ? xs.of(div()) : child.DOM))
示例5: app
function app(sources: {DOM: MainDOMSource}) {
const vtree$ = xs.of(h3('.top-most'));
return {
DOM: sources.DOM.isolateSink(vtree$, 'foo'),
};
}
示例6: app
function app(_sources: {DOM: MainDOMSource}) {
return {
DOM: xs.of(div()),
};
}
示例7: app
function app(sources: {DOM: MainDOMSource}) {
return {
DOM: xs.of(h3('.myelementclass', 'Foobar')),
};
}