当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript effects.takeLatest函数代码示例

本文整理汇总了TypeScript中redux-saga/effects.takeLatest函数的典型用法代码示例。如果您正苦于以下问题:TypeScript takeLatest函数的具体用法?TypeScript takeLatest怎么用?TypeScript takeLatest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了takeLatest函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: GisSaga

export default function* GisSaga() {
	yield takeLatest(GisTypes.INITIALISE_MAP, initialiseMap);
	yield takeLatest(GisTypes.ADD_SOURCE, addSource);
	yield takeLatest(GisTypes.REMOVE_SOURCE, removeSource);
	yield takeLatest(GisTypes.RESET_SOURCES, resetSources);
	yield takeLatest(GisTypes.RESET_MAP, resetMap);
}
开发者ID:3drepo,项目名称:3drepo.io,代码行数:7,代码来源:gis.sagas.ts

示例2: takeLatest

 return function*(): IterableIterator<ReadonlyArray<ForkEffect>> {
   yield [
     takeLatest(Actions.SignIn.SIGN_IN_SUCCESS, GetApiTokens),
     takeLatest(Actions.SignUp.SIGN_UP_SUCCESS, GetApiTokens),
     takeLatest(Actions.SetTokenLogin.SET_TOKEN_LOGIN, GetApiTokens),
   ]
 }
开发者ID:aconly,项目名称:frost-web,代码行数:7,代码来源:GetApiTokens.saga.ts

示例3: watchRecommend

export default function* watchRecommend () {
  yield all([
    takeLatest('home/recommend', recommendSaga),
    takeLatest('home/albums', syncMoreAlbums),
    takeLatest('home/artists', syncMoreArtists)
  ])
}
开发者ID:czb128abc,项目名称:gouqi,代码行数:7,代码来源:recommend.ts

示例4: watchAlbums

export default function* watchAlbums () {
  yield all([
    takeLatest('albums/refresh', refreshAlbums),
    takeLatest('albums/sync', syncMoreAlbums),
    takeEvery('albums/detail', syncAlbum)
  ])
}
开发者ID:czb128abc,项目名称:gouqi,代码行数:7,代码来源:album.ts

示例5: watchFetchBranchesAndCommits

export function* watchFetchBranchesAndCommits() {
  yield takeEvery(String(fetchRepoBranches), handleFetchBranches);
  yield takeEvery(String(fetchRepoCommits), handleFetchCommits);
  yield takeLatest(String(fetchFile), handleFetchFile);
  yield takeEvery(String(fetchDirectory), handleFetchDirs);
  yield takeLatest(String(fetchTreeCommits), handleFetchTreeCommits);
  yield takeLatest(String(fetchMoreCommits), handleFetchMoreCommits);
}
开发者ID:elastic,项目名称:kibana,代码行数:8,代码来源:file.ts

示例6: rootSaga

export default function* rootSaga() {
  yield call(restoreSettings);
  yield all([
    takeLatest(Actions.Commit, commitSettings),
    debounce(toastDebounce, Actions.UpdateFeedConfiguration, commitSettings),
    debounce(toastDebounce, Actions.UpdatePanelConfiguration, commitSettings),
    debounce(toastDebounce, Actions.UpdatePanelType, commitSettings),
    takeLatest(Actions.Committed, settingsStoredToast),
  ]);
}
开发者ID:tylerFowler,项目名称:chrome-dashboard,代码行数:10,代码来源:sagas.ts

示例7: watchDownload

export default function* watchDownload () {
  yield all([
    takeEvery('download/tracks', downloadTracksSaga),
    takeEvery('download/tracks/merge', mergeTracksSaga),
    takeEvery('download/tracks/set', setTracksSaga),
    takeLatest('download/stop', stopCurrentDownloadSaga),
    takeLatest('download/clear', clearAllDownload),
    takeEvery('download/tracks/delete', deleteDownloadTrackSaga)
  ])
}
开发者ID:czb128abc,项目名称:gouqi,代码行数:10,代码来源:download.ts

示例8: testChannelTakeLatest

function* testChannelTakeLatest(): SagaIterator {
  // typings:expect-error
  yield takeLatest(channel);

  // typings:expect-error
  yield takeLatest(channel, (action: Action) => {});
  yield takeLatest(channel, (action: {someField: string}) => {});
  // typings:expect-error
  yield takeLatest(channel, (a: 'a', action: {someField: string}) => {});
  // typings:expect-error
  yield takeLatest(channel, (a: 'a', action: {someField: string}) => {}, 1);
  yield takeLatest(channel, (a: 'a', action: {someField: string}) => {}, 'a');

  // typings:expect-error
  yield takeLatest(channel, (action: {someField: string}) => {}, 1);

  // typings:expect-error
  yield takeLatest(channel,
    (a: 'a', b: 'b', c: 'c', d: 'd', e: 'e', f: 'f', g: 'g',
     action: {someField: string}) => {},
    1, 'b', 'c', 'd', 'e', 'f', 'g'
  );

  yield takeLatest(channel,
    (a: 'a', b: 'b', c: 'c', d: 'd', e: 'e', f: 'f', g: 'g',
     action: {someField: string}) => {},
    'a', 'b', 'c', 'd', 'e', 'f', 'g'
  );
}
开发者ID:liesislukas,项目名称:redux-saga,代码行数:29,代码来源:effects.ts

示例9: watchArtists

export default function* watchArtists () {
  yield all([
    takeLatest('artists/refresh', refreshArtists),
    takeLatest('artists/sync', syncMoreArtists),
    takeLatest('artists/detail/follow', toggleSubscribeArtist),
    takeLatest('artists/favo', favorites),
    takeEvery('artists/detail/track', syncArtistTracks),
    takeEvery('artists/detail/album', syncArtistAlbums),
    takeEvery('artists/detail/description', syncArtistDescription)
  ])
}
开发者ID:czb128abc,项目名称:gouqi,代码行数:11,代码来源:artist.ts

示例10: test

test('main saga', () => {
  testSaga(mainSaga)
    .next()
    .all([
      takeLatest('home/recommend', recommendSaga),
      takeLatest('home/albums', syncMoreAlbums),
      takeLatest('home/artists', syncMoreArtists)
    ])
    .next()
    .isDone()
})
开发者ID:czb128abc,项目名称:gouqi,代码行数:11,代码来源:recommend.test.ts

示例11: test

test('main saga', () => {
  testSaga(mainSaga)
    .next()
    .all([
      takeLatest('albums/refresh', refreshAlbums),
      takeLatest('albums/sync', syncMoreAlbums),
      takeEvery('albums/detail', syncAlbum)
    ])
    .next()
    .isDone()
})
开发者ID:czb128abc,项目名称:gouqi,代码行数:11,代码来源:album.test.ts

示例12: ModelSaga

export default function* ModelSaga() {
	yield takeLatest(ModelTypes.FETCH_SETTINGS, fetchSettings);
	yield takeLatest(ModelTypes.FETCH_META_KEYS, fetchMetaKeys);
	yield takeLatest(ModelTypes.UPDATE_SETTINGS, updateSettings);
	yield takeLatest(ModelTypes.FETCH_REVISIONS, fetchRevisions);
	yield takeLatest(ModelTypes.DOWNLOAD_MODEL, downloadModel);
	yield takeLatest(ModelTypes.UPLOAD_MODEL_FILE, uploadModelFile);
	yield takeLatest(ModelTypes.ON_MODEL_STATUS_CHANGED, onModelStatusChanged);
	yield takeLatest(ModelTypes.SUBSCRIBE_ON_STATUS_CHANGE, subscribeOnStatusChange);
	yield takeLatest(ModelTypes.UNSUBSCRIBE_ON_STATUS_CHANGE, unsubscribeOnStatusChange);
	yield takeLatest(ModelTypes.FETCH_MAPS, fetchMaps);
}
开发者ID:3drepo,项目名称:3drepo.io,代码行数:12,代码来源:model.sagas.ts

示例13: watchPlaylist

export default function* watchPlaylist () {
  yield all([
    fork(syncPlaylistDetail),
    fork(subscribePlaylist),
    fork(popupTrackActionSheet),
    fork(popupCollectActionSheet),
    fork(collectTrackToPlayliast),
    fork(toCommentPage),
    fork(toCreatePlaylistPage),
    takeLatest('playlists/refresh', refreshPlaylist),
    takeLatest('playlists/sync', syncPlaylists)
  ])
}
开发者ID:czb128abc,项目名称:gouqi,代码行数:13,代码来源:playlist.ts

示例14: test

test('mainSaga', () => {
  testSaga(mainSaga)
    .next()
    .all([
      takeEvery('download/tracks', downloadTracksSaga),
      takeEvery('download/tracks/merge', mergeTracksSaga),
      takeEvery('download/tracks/set', setTracksSaga),
      takeLatest('download/stop', stopCurrentDownloadSaga),
      takeLatest('download/clear', clearAllDownload),
      takeEvery('download/tracks/delete', deleteDownloadTrackSaga)
    ])
    .next()
    .isDone()
})
开发者ID:czb128abc,项目名称:gouqi,代码行数:14,代码来源:download.test.ts

示例15: ViewpointsSaga

export default function* ViewpointsSaga() {
	yield takeLatest(ViewpointsTypes.FETCH_VIEWPOINTS, fetchViewpoints);
	yield takeLatest(ViewpointsTypes.CREATE_VIEWPOINT, createViewpoint);
	yield takeLatest(ViewpointsTypes.UPDATE_VIEWPOINT, updateViewpoint);
	yield takeLatest(ViewpointsTypes.DELETE_VIEWPOINT, deleteViewpoint);
	yield takeLatest(ViewpointsTypes.SHOW_VIEWPOINT, showViewpoint);
	yield takeLatest(ViewpointsTypes.SET_CAMERA_ON_VIEWPOINT, setCameraOnViewpoint);
	yield takeLatest(ViewpointsTypes.SUBSCRIBE_ON_VIEWPOINT_CHANGES, subscribeOnViewpointChanges);
	yield takeLatest(ViewpointsTypes.UNSUBSCRIBE_ON_VIEWPOINT_CHANGES, unsubscribeOnViewpointChanges);
	yield takeLatest(ViewpointsTypes.PREPARE_NEW_VIEWPOINT, prepareNewViewpoint);
}
开发者ID:3drepo,项目名称:3drepo.io,代码行数:11,代码来源:viewpoints.sagas.ts


注:本文中的redux-saga/effects.takeLatest函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。