In the recent project process, we introduced the NG2-cookies library into the project. Once we used the get() method when writing the code, we needed to know the type of the return value, but as a caller, WE didn’t pay attention to the methods in the library before.

I went to the GitHub repository for ng2-cookies and read the source code for some get() methods as follows:

So you know that the return type of the get() method is a string.

So reading the source code is a good way to learn more about an introduced third-party library.

Reference: github.com/BCJTI/ng2-c…