2

TypeScript is a programming language released as Apache 2.0.

Can I create my own JS library, using TypeScript, and publish it under MIT, including the compiled results (i.e. including the auto-generated JavaScript files)?

When running my build tools to generate the final JavaScript compiled code, the following was automatically inserted to the resulting file (not in the beginning, but in the middle of it):

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

So, in short, I have a .js file which:

  • Was generated by the TypeScript compiler (with the help of other MIT licensed build tools)
  • Includes the above license comment.

Can I release such file, and the rest of my library, under MIT?


EDIT: I've added a bounty to draw more attention, I will be happy to provide extra information if necessary.

1

The note says the file includes parts of APL 2.0 code. You can then release only under licenses compatible with that one. If you take a peek at this license compatibility chart you see that APL 2.0 is not compatible with MIT (i.e., you can mix MIT and APL, the result has to be licensed APL; not the other way around).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.