Created
April 22, 2020 14:30
-
-
Save adamhjk/3ad83b5676297cc6af8db8c38a9489c2 to your computer and use it in GitHub Desktop.
A simple example of typescript being helpful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface AssociationConstructor { | |
typeName: Association["typeName"]; | |
methodName: Association["methodName"]; | |
fieldName?: Association["fieldName"]; | |
} | |
interface BelongsToConstructor | |
extends Omit<AssociationConstructor, "methodName"> { | |
fromFieldPath: BelongsTo["fromFieldPath"]; | |
methodName?: Association["methodName"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment