TextAsset Question

I am working on quest narratives for my project, and I was trying to figure out how best to handle them. TextAsset looks promising, but I’m not sure how to use it. To be more specific, how do I declare an object of this type? It needs a file name, doesn’t it? Or am I missing something in how it is meant to be used?

Obviously it has to be a file, and these are supported
.txt
.html
.htm
.xml