TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mel_lisau
NA
169
0
What are functions replaced with in Typescript ?
May 2 2017 12:43 AM
Hi ,
I am migrating code from Javascript to TypeScript
I have the following
function myDateDialog()
{
var retDay;
var retMonth;
var retYear;
}
function openDatePickerDialog(wnd, field, dateFormat) {
myDateDialog.retDay = "";
myDateDialog.retMonth = "";
myDateDialog.retYear = "";
var dlgURL = '../DatePicker.htm';
field.value = dateFormat.replace(/yyyy/,
myDateDialog.retYea
r).replace(/MM/,
myDateDialog.retMonth
).replace(/dd/,
myDateDialog.retDay
);
what would be the best to replace the Javascript code
function myDateDialog() , would a class be best and declare retDay , retMonth and retYear as properties ?
Then instantiate the class in openDatePickerDialog and set the properties values ?
or is there a better approach ?
Thanks
Reply
Answers (
1
)
How to read the .CSV file using XML
information technology use of agriculture