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 @inheritdoc #2943

Merged
merged 17 commits into from
Dec 6, 2018
Merged

Add @inheritdoc #2943

merged 17 commits into from
Dec 6, 2018

Conversation

wnvko
Copy link
Contributor

@wnvko wnvko commented Nov 6, 2018

Add @inheritdoc to public fields in classes which implementing interfaces. This allows comments from interfaces to show in classes in TypeDoc API documentation.

@wnvko wnvko added 📖 documentation ✅ status: verified Applies to PRs that have passed manual verification labels Nov 6, 2018
damyanpetev
damyanpetev previously approved these changes Nov 6, 2018
@@ -56,17 +92,29 @@ export class IgxBaseTransactionService<T extends Transaction, S extends State> i
return state.value;
}

/**
* @inheritdoc
*/
commit(data: any): void { }
Copy link
Contributor

Choose a reason for hiding this comment

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

the signatures between the interface and the class are not the same we have commit(data: any): void and commit(data: any[]): void. Parameters does not match which leads to unsuccessful comment inheritance.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -31,6 +31,9 @@ export class AutoPositionStrategy extends ConnectedPositioningStrategy implement


// The position method should return a <div> container that will host the component
/**
* @inheritdoc
*/
position(contentElement: HTMLElement, size: { width: number, height: number }, document?: Document, initialCall?: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Signatures between the interface and the class are not the same. Parameters does not match which leads to unsuccessful comment inheritance.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

/**
* @inheritdoc
*/
position(contentElement: HTMLElement, size: { width: number, height: number }, document?: Document, initialCall?: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Signatures between the interface and the class are not the same. Parameters does not match which leads to unsuccessful comment inheritance.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@@ -17,6 +17,9 @@ export class GlobalPositionStrategy implements IPositionStrategy {
this.settings = Object.assign({}, this._defaultSettings, settings);
}

/**
* @inheritdoc
*/
position(contentElement: HTMLElement, size?: { width: number, height: number}, document?: Document, initialCall?: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Signatures between the interface and the class are not the same. Parameters does not match which leads to unsuccessful comment inheritance.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@kdinev kdinev changed the base branch from master to 6.2.x November 6, 2018 17:52
wnvko and others added 5 commits November 7, 2018 09:47
TypeDocs may take dev comments only from interfaces when @inheritdoc is added.
However, scroll strategies need to have constructor. This is why we add
ScrollStrategy abstract class. It is implementing IScrollStrategy, and then
all implementations extends the new abstract class
@Aleksandyr Aleksandyr added ❌ status: awaiting-test PRs awaiting manual verification and removed ✅ status: verified Applies to PRs that have passed manual verification labels Nov 12, 2018
@@ -17,5 +20,5 @@ export interface IPositionStrategy {
* settings.positionStrategy.position(content, size, document, true);
* ```
*/
position(contentElement: HTMLElement, size?: {}, document?: Document, initialCall?: boolean): void;
position(contentElement: HTMLElement, size?: { width: number, height: number }, document?: Document, initialCall?: boolean): void;
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work because the size parameter is a object and when the comparison between the parameters came the objects would have different references which respectively means that the parameters are not equal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Now we have Size interface and position method accepts Size parameter.

@Aleksandyr Aleksandyr added 🛠️ status: in-development Issues and PRs with active development on them and removed ❌ status: awaiting-test PRs awaiting manual verification labels Nov 20, 2018
@wnvko wnvko added ❌ status: awaiting-test PRs awaiting manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them labels Nov 28, 2018
@bazal4o bazal4o added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Dec 6, 2018
@bazal4o bazal4o added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Dec 6, 2018
@kdinev kdinev merged commit d152de7 into 6.2.x Dec 6, 2018
@kdinev kdinev deleted the mvenkov/add-inheritdoc-to-comments branch December 6, 2018 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation version: 6.2.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants