[BUGFIX] Allow resource as type definition