Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typescript] How to import Transition model? #41

Closed
lukaszgrolik opened this issue Apr 25, 2017 · 2 comments
Closed

[typescript] How to import Transition model? #41

lukaszgrolik opened this issue Apr 25, 2017 · 2 comments

Comments

@lukaszgrolik
Copy link

Is there a way of using Transition model to define a type in Typescript code? Would be nice if something like this was possible:

import {Transition} from 'ui-router-react'

// ...

// resolve object in state definition
{
  token: 'someToken',
  resolveFn: async (transition: Transition) => {
    // ...       
  },
  deps: ['$transition$']
 }
@Kukkimonsuta
Copy link
Contributor

import { Transition } from 'ui-router-core';

@elboman
Copy link
Member

elboman commented Apr 26, 2017

With 0.5.0 the lib is going to export everything the core exports, so you're going to be able to import Transition from the react lib, as the core is a dependency and shouldn't be used directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants