-
Notifications
You must be signed in to change notification settings - Fork 1
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
docs: update readme with typescript setup #1
base: steveszc-types
Are you sure you want to change the base?
Conversation
mainmatter#2514 (comment) |
@steveszc I have made the requested changes. Please merge if it's OK now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry a couple more comments that I missed the first time.
import type Session from 'ember-simple-auth/services/session'; | ||
|
||
interface SessionData = { | ||
access_token: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I just noticed this...
string
needs to be lowercase here and on the next line.
import { inject as service } from '@ember/service'; | ||
import type Session from 'ember-simple-auth/services/session'; | ||
|
||
interface SessionData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include authenticator: string;
on this interface?
@@ -107,6 +107,31 @@ Installing the library is as easy as: | |||
ember install ember-simple-auth | |||
``` | |||
|
|||
### TypeScript setup | |||
1. Include `ember-simple-auth` typescript defs in the `tsconfig.json` under `paths` like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make a note that this may not be required depending on your TS configuration. I am not sure that this is strictly required in every situation. If you are positive it is needed then please disregard.
This PR adds TypeScript setup info to the README.md