Interface Property name named from myStrings
up vote
1
down vote
favorite
I typed up a bunch of strings for a project:
declare interface IMyWebPartStrings {
PropertyDamage: string;
EventWorkRelated: string;
EmployeeWearingProperPPE: string;
YourSupervisor: string;
Region: string;
Branch: string;
PositionTitle: string;
LocationOfEvent: string;
DateOfIncident: string;
InvolvedPeople: string;
EventDetails: string;
CorrectiveActions: string;
CorrectiveActionsDetails: string;
...
}
I am creating an interface
and it will have all the same names.
When I create the interface
, is there a way I can name the properties from the myStrings list?
javascript typescript
add a comment |
up vote
1
down vote
favorite
I typed up a bunch of strings for a project:
declare interface IMyWebPartStrings {
PropertyDamage: string;
EventWorkRelated: string;
EmployeeWearingProperPPE: string;
YourSupervisor: string;
Region: string;
Branch: string;
PositionTitle: string;
LocationOfEvent: string;
DateOfIncident: string;
InvolvedPeople: string;
EventDetails: string;
CorrectiveActions: string;
CorrectiveActionsDetails: string;
...
}
I am creating an interface
and it will have all the same names.
When I create the interface
, is there a way I can name the properties from the myStrings list?
javascript typescript
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I typed up a bunch of strings for a project:
declare interface IMyWebPartStrings {
PropertyDamage: string;
EventWorkRelated: string;
EmployeeWearingProperPPE: string;
YourSupervisor: string;
Region: string;
Branch: string;
PositionTitle: string;
LocationOfEvent: string;
DateOfIncident: string;
InvolvedPeople: string;
EventDetails: string;
CorrectiveActions: string;
CorrectiveActionsDetails: string;
...
}
I am creating an interface
and it will have all the same names.
When I create the interface
, is there a way I can name the properties from the myStrings list?
javascript typescript
I typed up a bunch of strings for a project:
declare interface IMyWebPartStrings {
PropertyDamage: string;
EventWorkRelated: string;
EmployeeWearingProperPPE: string;
YourSupervisor: string;
Region: string;
Branch: string;
PositionTitle: string;
LocationOfEvent: string;
DateOfIncident: string;
InvolvedPeople: string;
EventDetails: string;
CorrectiveActions: string;
CorrectiveActionsDetails: string;
...
}
I am creating an interface
and it will have all the same names.
When I create the interface
, is there a way I can name the properties from the myStrings list?
javascript typescript
javascript typescript
asked Nov 8 at 17:53
Holden1515
1119
1119
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
No, that is not possible.
Quick explanation: Interfaces are defined before compilation of the code, but the contents of the myStrings list is only known after, when the code is run (even when you hard-code the value of myStrings, this won't get interpreted until the code is run).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
No, that is not possible.
Quick explanation: Interfaces are defined before compilation of the code, but the contents of the myStrings list is only known after, when the code is run (even when you hard-code the value of myStrings, this won't get interpreted until the code is run).
add a comment |
up vote
1
down vote
No, that is not possible.
Quick explanation: Interfaces are defined before compilation of the code, but the contents of the myStrings list is only known after, when the code is run (even when you hard-code the value of myStrings, this won't get interpreted until the code is run).
add a comment |
up vote
1
down vote
up vote
1
down vote
No, that is not possible.
Quick explanation: Interfaces are defined before compilation of the code, but the contents of the myStrings list is only known after, when the code is run (even when you hard-code the value of myStrings, this won't get interpreted until the code is run).
No, that is not possible.
Quick explanation: Interfaces are defined before compilation of the code, but the contents of the myStrings list is only known after, when the code is run (even when you hard-code the value of myStrings, this won't get interpreted until the code is run).
answered Nov 8 at 19:29
Daniel Rothig
5448
5448
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53213507%2finterface-property-name-named-from-mystrings%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown