Skip to content
This repository was archived by the owner on Jan 18, 2021. It is now read-only.

Modified declaration file #37

Merged
merged 2 commits into from
Oct 23, 2018
Merged

Conversation

kelvinbell
Copy link
Contributor

Linting errors were produced in Typescript because of the declared classes in the declaration file. Changed the classes file, folder, list, site, and user to functions and added respective interfaces.

@@ -18,22 +18,20 @@ declare namespace sprLib {
interface FileInfoOptions {
version?: number;
}
class file {
Copy link
Contributor Author

@kelvinbell kelvinbell Oct 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these classes. Added IFile interface and file function to replace the 'file' class. This was repeated in the other classes.

@@ -89,6 +89,7 @@ declare namespace sprLib {
function site(siteUrl?: string): ISite;

interface UserOptions {
baseUrl?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'baseUrl' was in the documentation, but not in the declaration file.

@@ -98,7 +99,7 @@ declare namespace sprLib {
interface IUser {
info(): Promise<Object>;
groups(): Promise<Object[]>;
profile(arrProfileKeys: Object): Object;
profile(arrProfileKeys?: Object): Promise<Object>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returned a promise for the profile func.

@gitbrent gitbrent self-assigned this Oct 23, 2018
@gitbrent gitbrent added this to the 1.8.0 milestone Oct 23, 2018
@gitbrent gitbrent merged commit 9551b64 into gitbrent:master Oct 23, 2018
@gitbrent
Copy link
Owner

Excellent work, thanks @kelvinbell !

gitbrent added a commit that referenced this pull request Oct 23, 2018
@gitbrent gitbrent modified the milestones: 1.8.0, 1.9.0 Oct 23, 2018
gitbrent added a commit that referenced this pull request Oct 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants