3

I create web part with share point framework "no JavaScript framework" my code with TypeScript I have problem, I will get, or reading data taxonomy term store share point.

And my code in image enter image description here

Question: how to declare variable "SP" in my code? Because my code error asking variable "SP" to declare first

K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43

1 Answers1

0

SP is part of sp.js,but as you are working with SPFX WebPart, you should use TypeScript instead, please check the demo to read Taxonomy in SPFX webpart:

Taxonomy Web Part

And this file shows get Term from Term Store using TypeScript:

sp-dev-fx-webparts/samples/knockout-taxonomy/src/webparts/termSetRequester/data-helpers/DataHelperSP.ts

Jerry
  • 3,480
  • 1
  • 10
  • 12