Zum Hauptinhalt springen

ClientHelper

Dieses Modul stellt Helper-Funktionen zur Verfügung, die im Client global verfügbar sind.

getClientModule

Diese Funktion agiert als Getter für das globale Window-Objekt und ist dafür gedacht, in TypeScript-Portalskripten die Typisierung von clientseitigen globalen Variablen zu erleichtern.

Beispiel:

invplus.ts

type Invplus = { ... };

ou.sp.ptpINV.somePortalScript.ts

import type { Invplus } from "./invplus";

/* client side code from here */
const invplus = getClientModule<Invplus>("invplus");
const num = invplus.utils.round(3,1415);
/* client side code until here */