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

docs: update readme with typescript setup #1

Open
wants to merge 4 commits into
base: steveszc-types
Choose a base branch
from

Conversation

colenso
Copy link

@colenso colenso commented Mar 24, 2023

This PR adds TypeScript setup info to the README.md

@colenso
Copy link
Author

colenso commented Mar 24, 2023

mainmatter#2514 (comment)
@steveszc I did that here. Please review and merge away.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@colenso
Copy link
Author

colenso commented Apr 6, 2023

@steveszc I have made the requested changes. Please merge if it's OK now.

Copy link
Owner

@steveszc steveszc left a 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,
Copy link
Owner

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 = {
Copy link
Owner

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:
Copy link
Owner

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.

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

Successfully merging this pull request may close these issues.

3 participants