I have a simple chat server/client app, written in PHP (server side, 100% my own code) and AngularJS. The process for Angular development typically brings in many libraries with various licenses. Of the hundreds of files involved with the source of the project, I've created 5 of them from scratch, with no edits or changes made to any of the other code.
What I would like to do is license under the GPLv2 the actual TypeScript code that I have written, on a file-by-file basis for my 2 PHP files and 5 TypeScript files. All 7 of these files are 100% created/written by me.
Obviously, since the PHP code is all mine I can license it how I want, and it can be used stand-alone if the client side is re-implemented in any other language.
But what about my TypeScript? Can I license code that I wrote in any way I want - specifically GPLv2 - on a file by file basis, regardless of what other code it operates with/depends on and the license that other code uses?
My thinking on this is that some other user can decide to accept the terms of whatever license the libraries are under, and can use the code that I wrote under the provisions of the GPLv2. In theory, a user could use only the code I wrote to do some other project using some other framework as well.