1.307.0 • Published 11 months ago

@dynatrace/dtrum-api-types v1.307.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
11 months ago

Dynatrace Dtrum Api Types

This package contains the Typescript type information for the dtrum.* API of the RUM JavaScript.

Keep in mind that when the RUM JavaScript is updated, this type package might not provide accurate types. Version: 1.307.0

Installation

npm install --save-dev @dynatrace/dtrum-api-types

Configuration

Make sure to add these paths to "typeRoots" in tsconfig.json under "compilerOptions"

"typeRoots": ["./node_modules/@types", "./node_modules/@dynatrace/"],

Usage examples

Type inference works out of the box for dtrum calls.

if (window.dtrum) {
    window.dtrum.identifyUser("exampleId");
} else {
    // handle missing dtrum api
}

In case some specific types or enums are needed, you can import them from dtrum types library.

import { ActionNameResult } from '@dynatrace/dtrum-api-types';

if (window.dtrum) {
    const result = window.dtrum.actionName("exampleName");
    switch(result) {
      case ActionNameResult.SUCCESS:
      // handle success...
      break;
      case ActionNameResult.ACTION_NOT_FOUND:
      // handle action not found...
      break;
      //etc...
    }
} else {
    // handle missing dtrum api
}
1.307.0

11 months ago

1.305.2

11 months ago

1.303.1

11 months ago

1.299.6

1 year ago

1.301.7

1 year ago

1.297.3

1 year ago

1.295.6

1 year ago

1.293.12

1 year ago

1.291.1

1 year ago

1.285.2

1 year ago

1.287.7

1 year ago

1.289.2

1 year ago

1.283.3

2 years ago

1.281.3

2 years ago

1.273.1

2 years ago

1.275.1

2 years ago

1.271.1

2 years ago

1.279.1

2 years ago

1.277.3

2 years ago

1.269.4

2 years ago

1.265.3

2 years ago

1.267.3

2 years ago

1.259.4

3 years ago

1.261.2

3 years ago

1.263.3

3 years ago

1.257.2

3 years ago

1.255.1

3 years ago

1.253.4

3 years ago

1.251.1

3 years ago

1.249.3

3 years ago

1.243.1

3 years ago

1.247.2

3 years ago

1.245.2

3 years ago

1.241.1

3 years ago

1.239.1

3 years ago

1.237.2

4 years ago

1.235.5

4 years ago

1.233.5

4 years ago

1.231.7

4 years ago

1.229.5

4 years ago

1.227.14

4 years ago

1.225.8

4 years ago

1.223.5

4 years ago

1.221.12

4 years ago

1.219.10

4 years ago