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

Errors from core interface type definitions #3499

Closed
2 of 6 tasks
gaui opened this issue Jul 10, 2017 · 1 comment
Closed
2 of 6 tasks

Errors from core interface type definitions #3499

gaui opened this issue Jul 10, 2017 · 1 comment

Comments

@gaui
Copy link

gaui commented Jul 10, 2017

This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.

This is a:

  • Bug Report
  • Feature Request
  • General Query

My version of UI-Router is: (version)

1.0.5

Bug Report

Current Behavior:

When importing interfaces/types from core package @uirouter/core like this (it doesn't matter what you import):

import { StateService } from '@uirouter/core';

and running tsc yields the following compilation errors:

node_modules/@uirouter/core/lib/transition/interface.d.ts(732,5): error TS2411: Property 'to' of type 'string | boolean | Predicate<StateDeclaration> | undefined' is not assignable to string index type 'string | boolean | Predicate<StateDeclaration>'.

node_modules/@uirouter/core/lib/transition/interface.d.ts(734,5): error TS2411: Property 'from' of type 'string | boolean | Predicate<StateDeclaration> | undefined' is not assignable to string index type 'string | boolean | Predicate<StateDeclaration>'.

node_modules/@uirouter/core/lib/transition/interface.d.ts(736,5): error TS2411: Property 'exiting' of type 'string | boolean | Predicate<StateDeclaration> | undefined' is not assignable to string index type 'string | boolean | Predicate<StateDeclaration>'.

node_modules/@uirouter/core/lib/transition/interface.d.ts(738,5): error TS2411: Property 'retained' of type 'string | boolean | Predicate<StateDeclaration> | undefined' is not assignable to string index type 'string | boolean | Predicate<StateDeclaration>'.

node_modules/@uirouter/core/lib/transition/interface.d.ts(740,5): error TS2411: Property 'entering' of type 'string | boolean | Predicate<StateDeclaration> | undefined' is not assignable to string index type 'string | boolean | Predicate<StateDeclaration>'.

This means people can't use interfaces from the core package. I also tried to import it from @uirouter/angularjs instead, but got the same error.

I set up the following repo that reproduces the issue:
https://github.com/gaui/uirouter-types-issue

Expected Behavior:

Should not yield any compilation errors.

Link to GitHub repo that reproduces the issue:

https://github.com/gaui/uirouter-types-issue

Feature Request

(feature request here)

General Query

Please direct general implementation questions to StackOverflow:
http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router

Please review the Sample Application which highlights common approaches:
https://github.com/ui-router/sample-app-ng1

  • I have already asked my question on StackOverflow and nobody could answer the question

  • I have already reviewed the sample application for examples of common approaches

  • I believe my question can only be answered by the UI-Router maintainers

(general query here)

@christopherthielen
Copy link
Contributor

ui-router/core#33

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

2 participants