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

Add Type Definitions to okta-react so it can be easily be used in a TypeScript project #66

Open
mraible opened this issue Nov 29, 2017 · 8 comments
Labels

Comments

@mraible mraible changed the title Add Type Definitions so can be easily be used in a TypeScript project Add Type Definitions to okta-react so it can be easily be used in a TypeScript project Nov 29, 2017
@jmelberg-okta jmelberg-okta added the react label Dec 1, 2017
@tjpeden

This comment has been minimized.

Copy link

@tjpeden tjpeden commented Dec 9, 2017

@mraible Angular folks need this too. 👍

@nbankin

This comment has been minimized.

Copy link

@nbankin nbankin commented Feb 9, 2018

Express folks need this too. 👍

@robertjd

This comment has been minimized.

Copy link
Collaborator

@robertjd robertjd commented Feb 9, 2018

Hi all, thanks for the requests! I certainly love typescript :) Some questions: I assume you're using VS Code? If so, I wonder if JsDoc annotations can also serve us well? I ask because it "feels like" VS Code has been getting better at giving intellisense based on those annotations (but maybe I'm imaging things).

@miguelarca

This comment has been minimized.

Copy link

@miguelarca miguelarca commented Apr 24, 2018

Any news on getting the Type Definitions yet? I am trying to use it with react and typescript but no luck.

@tsiq-swyx

This comment has been minimized.

Copy link

@tsiq-swyx tsiq-swyx commented Jun 4, 2018

me too

@mraible

This comment has been minimized.

Copy link
Author

@mraible mraible commented Jun 5, 2018

Here's a blog post that shows you how to use okta-react with Create React App and TypeScript: https://developer.okta.com/blog/2017/12/06/bootiful-development-with-spring-boot-and-react

Steps after installing okta-react:

yarn add -D @types/react-router-dom@4.2.6

You'll get an error when you try to import/use any Okta classes:

Could not find a declaration file for module '@okta/okta-react'.

Create src/okta.d.ts with the following declaration to solve this problem:

declare module '@okta/okta-react';

Hope this helps!

@tsiq-swyx

This comment has been minimized.

Copy link

@tsiq-swyx tsiq-swyx commented Jun 5, 2018

wow. surprised its that easy. thanks!

@Doff3n Doff3n mentioned this issue Nov 12, 2019
2 of 14 tasks complete
@robertjd

This comment has been minimized.

Copy link
Collaborator

@robertjd robertjd commented Jan 29, 2020

Hi everyone, thank you for your thoughts. We've discussed this and have decided that Typescript should get some first-party support from us, so we will start working it into our roadmap. Continue to watch this issue for updates. Thanks!

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.