Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
TypeScript custom function not recognized in shared utility class

I have a TypeScript class implements an Interface with the following declarations. In the class I imported the .js at the beginning of the class file and implemented every function. All worked fine, until I added a new function in the Interface and implemented the new function in the class. When the project is published, including deleting all files in the existing target folder, to an IIS host, the Edge browser doesn't recognize the additional function. I re-published the project several time without avail. The next day, the function is recognized. The new function is always immediately recognized at compile time. Does any know why?

form.ts: 254

Uncaught TypeError: commonUtility.isTheSame is not a
function
at HTMLInputElement. < anonymous > (form.ts: 254: 25)
at Function.each(jquery - 3.6 .0.min.js: 2: 3003)
at S.fn.init.each(jquery - 3.6 .0.min.js: 2: 1481)
at Object.submitTheForm(form.ts: 241: 18)
at HTMLButtonElement. < anonymous > (form.ts: 86: 22)
at HTMLButtonElement.dispatch(jquery - 3.6 .0.min.js: 2: 43064)
at HTMLButtonElement.v.handle(jquery - 3.6 .0.min.js: 2: 41048)

export interface ICommonUtility {
  isDate(aDate: Date): boolean;
  isEmpty($this: any): boolean;
  isTheSame($this: any, oldValue: string, currentValue: string): boolean;
  getCRUD($this: any, oldValue: string, currentValue: string): string;
  getControlValue($this: any): number;
  resetControlValue($this: any, newValue: string)
  getTextPixels(someText: string, font: any);
  breakLongSentence(thisSelectElement);
}

/// <reference path="../../node_modules/@types/jquery/jquery.d.ts" />

import { ICommonUtility } from "../appModels/ICommonUtility.js";

export class Utility implements ICommonUtility {
  isDate(aDate: Date): boolean {
   
  }

  isEmpty($this: any): boolean {
    
  }

  isTheSame($this: any, oldValue: string, currentValue: string): boolean {

  }

  getCRUD($this: any, oldValue: string, currentValue: string): string {
    
  }

  getControlValue($thisControl: any, valueSource: string = 'other'): any {
 
  }

  resetControlValue($thisControl: any, newValue: string) {

}

  getTextPixels(someText: string, font: any) {

  }

  breakLongSentence(thisSelectElement: any) {

  }
}

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It worked when isTheSame() became public isTheSame() in the implementing Utility class. Still don't know why this is necessary.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda