
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@tableau/extensions-api-types
Advanced tools
The Tableau Extensions API type definitions enable you to write your extension source code in TypeScript. You can use the TypeScript compiler (tsc) to transpile the TypeScript source code to JavaScript for use with your extension.
@tableau/extensions-api-types
) in the node_modules
folder of the current
directory.npm install @tableau/extensions-api-types
Parameter
, you would use the following:import { Parameter } from '@tableau/extensions-api-types';
If you want to use Tableau enumerations as parameters to functions, or as a member variables inside
class definitions, you need to import the type definitions from @tableau/extensions-api-types
. You
can then declare parameters or variables of that type. For example, to be able to use the DataType
enum as a parameter to a function, you need to use the following import statement:
import { DataType } from '@tableau/extensions-api-types';
You can then use DataType
as a type for a parameter in a class method. You can't use the fully
qualified name as a parameter type (tableau.DataType
), even though you can use the fully qualified
name within a method.
private foo(value: DataType) {
switch (value) {
case tableau.DataType.String:
console.log(value);
break;
// ... do other things
}
}
Please note that @tableau/extension-api-types
submodules are subject to change. Import only from
@tableau/extensions-api-types
.
typeRoots
option to the
location where you have installed the Extensions API type definitions. For example, the
Samples-TypeScript
extensions on GitHub use webpack and Node.js to build the samples.{
"compilerOptions": {
/* Basic Options */
"target": "esnext",
"module": "commonjs",
"sourceMap": true,
"alwaysStrict": true,
"baseUrl": "./Samples-Typescript",
"typeRoots": ["./node_modules/@tableau", "./node_modules/@types"]
}
}
tsc
).<!-- Extensions Library -->
<script src="../../lib/tableau.extensions.1.latest.js"></script>
<!-- The extension code -->
<script src="./datasources.js"></script>
FAQs
Type declarations for Tableau Extensions API
The npm package @tableau/extensions-api-types receives a total of 453 weekly downloads. As such, @tableau/extensions-api-types popularity was classified as not popular.
We found that @tableau/extensions-api-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.