Fix SourceRange values in OrderedCommands to match the TS type (#4785)
* Fix SourceRange type to match WASM commands * Update artifact graph test snap * Update artifact graph test
This commit is contained in:
@ -65,6 +65,7 @@ export type { BinaryPart } from '../wasm-lib/kcl/bindings/BinaryPart'
|
||||
export type { Literal } from '../wasm-lib/kcl/bindings/Literal'
|
||||
export type { LiteralValue } from '../wasm-lib/kcl/bindings/LiteralValue'
|
||||
export type { ArrayExpression } from '../wasm-lib/kcl/bindings/ArrayExpression'
|
||||
export type { SourceRange as RustSourceRange } from 'wasm-lib/kcl/bindings/SourceRange'
|
||||
|
||||
export type SyntaxType =
|
||||
| 'Program'
|
||||
@ -117,6 +118,13 @@ export function defaultSourceRange(): SourceRange {
|
||||
return [0, 0, true]
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a default RustSourceRange for testing or as a placeholder.
|
||||
*/
|
||||
export function defaultRustSourceRange(): RustSourceRange {
|
||||
return [0, 0, 0]
|
||||
}
|
||||
|
||||
export const wasmUrl = () => {
|
||||
// For when we're in electron (file based) or web server (network based)
|
||||
// For some reason relative paths don't work as expected. Otherwise we would
|
||||
|
Reference in New Issue
Block a user