Typescript Get Value Of Object Javascript Methods