I think it's good etiquette to post more than the link, so here you go:
@export_file var resource
# With filter:
@export_file("*.tres") var resource
But instead of exporting a resource path and loading it in the script, you could of course export the resource type:
@export var resource: Resource