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

Persist the deprecation of fields #10

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Persist the deprecation of fields #10

merged 1 commit into from
Oct 24, 2023

Conversation

RichardInnocent
Copy link
Contributor

Fixes #9

@a-h a-h merged commit 86f9f9a into a-h:main Oct 24, 2023
@a-h
Copy link
Owner

a-h commented Oct 24, 2023

Thanks for that.

@joerdav
Copy link
Contributor

joerdav commented Oct 24, 2023

The go doc deprecation works slightly different from this, by paragraph it means the beginning of a block of text rather than a line:

type s struct {
	// MyNotDeprecatedField is not deprecated though it may seem it
	// Deprecated: don't use this field
	MyNotDeprecatedField string
	
	// Deprecated: don't use this field
	// MyDeprecatedField is deprecated
	MyDeprecatedField string
	
	// AnotherDeprecatedField is deprecated
	//
	// Deprecated: don't use this field
	AnotherDeprecatedField string
}

@RichardInnocent
Copy link
Contributor Author

@joerdav Maybe, the documentation seems somewhat ambiguous. I wondered this myself and tested it in Goland before raising this PR which seems to think the line in the middle isn't necessary.

image

@joerdav
Copy link
Contributor

joerdav commented Oct 24, 2023

Interesting, I think maybe goland detects it in this case. But thing such as static check won't pick it up.

But maybe this solution is fine anyway, probably doesn't matter!

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.

Persist deprecation of fields to TS models
3 participants