onnxruntime/js/common/lib
Yulong Wang 1c79a4c9dd
[js/common] use TS type inference to eliminate unknown (#23012)
### Description

This change uses a TypeScript trick to infer global types in
onnxruntime-common. Thanks to the strong type system of TypeScript, we
are able to refer to types that may not be available in the context.

This helps to keep onnxruntime-common not to include dependencies like
"@webgpu/types", and still being able to use the types in the
declaration. See comments of `TryGetGlobalType` in `type-helper.ts`.
2024-12-04 19:01:26 -08:00
..
backend-impl.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
backend.ts [js] remove more unused training types (#22753) 2024-12-04 16:44:09 -08:00
env-impl.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
env.ts [js/common] use TS type inference to eliminate unknown (#23012) 2024-12-04 19:01:26 -08:00
index.ts [js] remove more unused training types (#22753) 2024-12-04 16:44:09 -08:00
inference-session-impl.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
inference-session.ts [js/common] use TS type inference to eliminate unknown (#23012) 2024-12-04 19:01:26 -08:00
onnx-model.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
onnx-value.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
tensor-conversion-impl.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
tensor-conversion.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
tensor-factory-impl.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
tensor-factory.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
tensor-impl-type-mapping.ts [js/web] Add support for int4/uint4 tensor (#21720) 2024-08-15 21:32:10 -07:00
tensor-impl.ts [WebNN] Support int4 and uint4 data types (#22575) 2024-10-25 17:44:46 -07:00
tensor-utils-impl.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
tensor-utils.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
tensor.ts [js/common] use TS type inference to eliminate unknown (#23012) 2024-12-04 19:01:26 -08:00
trace.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
type-helper.ts [js/common] use TS type inference to eliminate unknown (#23012) 2024-12-04 19:01:26 -08:00
version.ts bumps up version in main from 1.20 -> 1.21 (#22482) 2024-10-17 12:32:35 -07:00