{"record":{"id":"660d2f5461904dfa","repo":"FuelLabs/fuels-ts","slug":"type-not-supported-660d2f","errorCode":"TYPE_NOT_SUPPORTED","errorMessage":"Type not supported: ${type}","messagePattern":"Type not supported: (.+?)","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/abi-typegen/src/utils/makeType.ts","lineNumber":14,"sourceCode":"import { ErrorCode, FuelError } from '@fuel-ts/errors';\n\nimport type { JsonAbiType } from '../types/interfaces/JsonAbi';\n\nimport { supportedTypes } from './supportedTypes';\n\nexport function makeType(params: { rawAbiType: JsonAbiType }) {\n  const { rawAbiType } = params;\n  const { type } = rawAbiType;\n\n  const TypeClass = supportedTypes.find((tc) => tc.isSuitableFor({ type }));\n\n  if (!TypeClass) {\n    throw new FuelError(ErrorCode.TYPE_NOT_SUPPORTED, `Type not supported: ${type}`);\n  }\n\n  return new TypeClass(params);\n}\n","sourceCodeStart":1,"sourceCodeEnd":19,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/abi-typegen/src/utils/makeType.ts#L1-L19","documentation":"makeType iterates the supportedTypes registry and picks the first whose isSuitableFor({ type }) returns true for the rawAbiType.type string. If none is suitable, the Sway type is one the typegen does not implement, so it cannot emit a corresponding TypeScript type.","triggerScenarios":"An ABI declaring a Sway type not yet supported by the installed typegen (e.g. a newly introduced Sway type, an experimental/generic type); a custom malformed type string.","commonSituations":"SDK version older than the Sway compiler that produced the ABI; experimental Sway features; ABI from a different language targeting Fuel.","solutions":["Upgrade @fuel-ts/abi-typegen (and the SDK) to a release supporting the Sway type shown in the error.","Remove or replace the unsupported Sway type in your contract/script/predicate source and rebuild the ABI.","Check the release notes/changelog for the supported Sway type set of your SDK version."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { supportedTypes } from '@fuel-ts/abi-typegen';\nfunction assertTypeSupported(rawAbiType: JsonAbiType) {\n  if (!supportedTypes.some(tc => tc.isSuitableFor({ type: rawAbiType.type }))) {\n    throw new Error(`Sway type not supported by typegen: ${rawAbiType.type}`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the SDK up to date with your Sway compiler version.","Check the changelog for the supported Sway type list.","Avoid experimental Sway types in code that needs typegen output."],"tags":["typegen","type-not-supported","sway-version","upgrade"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}