(ds: InterpretDataSourceConfig, context: IDataSourceRuntimeContext)
| 101 | } |
| 102 | |
| 103 | export const buildShouldFetch = (ds: InterpretDataSourceConfig, context: IDataSourceRuntimeContext) => { |
| 104 | if (!ds.options || !ds.shouldFetch) { |
| 105 | return true // 默认为 true |
| 106 | } |
| 107 | if (isJSExpression(ds.shouldFetch) || isJSFunction(ds.shouldFetch)) { |
| 108 | return getRuntimeJsValue(ds.shouldFetch, context) |
| 109 | } |
| 110 | |
| 111 | return getRuntimeBaseValue('boolean', ds.shouldFetch) |
| 112 | } |
| 113 | |
| 114 | export const buildOptions = (ds: InterpretDataSourceConfig, context: IDataSourceRuntimeContext) => { |
| 115 | const { options } = ds |
no test coverage detected